Chromium Code Reviews| Index: chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h |
| diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h |
| index dd115ccf6e01aef97b32bb8771b625d7cf30705a..59a07b6922cc9bef45202061a6c9f1a6803b14dd 100644 |
| --- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h |
| +++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h |
| @@ -5,9 +5,22 @@ |
| #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ |
| #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ |
| +#include <map> |
| + |
| +#include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h" |
| +#include "chrome/browser/profiles/profile.h" |
|
Devlin
2016/01/07 23:08:29
ditto from line 13.
Azure Wei
2016/01/08 06:40:55
Done.
|
| #include "extensions/browser/extension_function.h" |
| +#include "ui/base/ime/ime_engine_handler_interface.h" |
|
Devlin
2016/01/07 23:08:29
Do we need to include this, or do forward declarat
Azure Wei
2016/01/08 06:40:55
No need. I've removed these.
|
| + |
| +class Profile; |
| + |
| +namespace ui { |
| +class IMEEngineHandlerInterface; |
| +} // namespace ui |
| namespace extensions { |
| +class InputImeEventRouterBase; |
| +struct InputComponentInfo; |
| class InputImeSetCompositionFunction : public SyncExtensionFunction { |
| public: |
| @@ -138,6 +151,28 @@ class InputImeHideInputViewFunction : public AsyncExtensionFunction { |
| bool RunAsync() override; |
| }; |
| +class InputImeEventRouter : public InputImeEventRouterBase { |
| + public: |
| + explicit InputImeEventRouter(Profile* profile); |
| + ~InputImeEventRouter() override; |
| + |
| + bool RegisterImeExtension( |
| + const std::string& extension_id, |
| + const std::vector<extensions::InputComponentInfo>& input_components); |
|
Devlin
2016/01/07 23:08:29
#include <vector>
Azure Wei
2016/01/08 06:40:55
Done.
|
| + void UnregisterAllImes(const std::string& extension_id); |
| + |
| + ui::IMEEngineHandlerInterface* GetEngine(const std::string& extension_id, |
| + const std::string& component_id); |
| + ui::IMEEngineHandlerInterface* GetActiveEngine( |
| + const std::string& extension_id); |
| + |
| + private: |
| + // The engine map from extension_id to an engine. |
| + std::map<std::string, ui::IMEEngineHandlerInterface*> engine_map_; |
|
Devlin
2016/01/07 23:08:29
#include <string>
Azure Wei
2016/01/08 06:40:55
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter); |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ |