1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef UI_BASE_IME_CHROMEOS_COMPONENT_EXTENSION_IME_MANAGER_DELEGATE_H_
6 #define UI_BASE_IME_CHROMEOS_COMPONENT_EXTENSION_IME_MANAGER_DELEGATE_H_
7 
8 #include "base/component_export.h"
9 #include "base/files/file_path.h"
10 #include "base/macros.h"
11 
12 class Profile;
13 
14 namespace chromeos {
15 
16 struct ComponentExtensionIME;
17 
18 // Provides an interface to list/load/unload for component extension IME.
COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS)19 class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS)
20     ComponentExtensionIMEManagerDelegate {
21  public:
22   virtual ~ComponentExtensionIMEManagerDelegate() {}
23 
24   // Lists installed component extension IMEs.
25   virtual std::vector<ComponentExtensionIME> ListIME() = 0;
26 
27   // Loads component extension IME associated with |extension_id|.
28   // Returns false if it fails, otherwise returns true.
29   virtual void Load(Profile* profile,
30                     const std::string& extension_id,
31                     const std::string& manifest,
32                     const base::FilePath& path) = 0;
33 };
34 
35 }  // namespace chromeos
36 
37 #endif  // UI_BASE_IME_CHROMEOS_COMPONENT_EXTENSION_IME_MANAGER_DELEGATE_H_
38