Chromium Code Reviews| Index: chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h |
| diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h b/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h |
| index c3567aed81df176121220e570e2b94b6e3756fa1..96650bbda602115df0f520a2984ab77c282b31e3 100644 |
| --- a/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h |
| +++ b/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h |
| @@ -7,6 +7,7 @@ |
| #include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "extensions/browser/extension_function.h" |
| class Profile; |
| @@ -18,9 +19,43 @@ class InputImeEventRouter : public InputImeEventRouterBase { |
| explicit InputImeEventRouter(Profile* profile); |
| ~InputImeEventRouter() override; |
| + bool RegisterImeExtension(const std::string& extension_id); |
|
Devlin
2016/01/13 18:22:59
all these functions should be documented.
Azure Wei
2016/01/14 14:03:48
Done.
|
| + void UnregisterImeExtension(const std::string& extension_id); |
| + |
| + ui::IMEEngineHandlerInterface* GetActiveEngine( |
| + const std::string& extension_id); |
| + |
| + void SetActiveEngine(const std::string& extension_id); |
| + |
| + private: |
| + // The id of the all registered extensions. |
| + std::vector<std::string> extension_ids_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter); |
| }; |
| +class InputImeActivateFunction : public UIThreadExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION("input.ime.activate", INPUT_IME_ACTIVATE) |
| + |
| + protected: |
| + ~InputImeActivateFunction() override {} |
| + |
| + // UIThreadExtensionFunction: |
| + ResponseAction Run() override; |
| +}; |
| + |
| +class InputImeDeactivateFunction : public UIThreadExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION("input.ime.deactivate", INPUT_IME_DEACTIVATE) |
| + |
| + protected: |
| + ~InputImeDeactivateFunction() override {} |
| + |
| + // UIThreadExtensionFunction: |
| + ResponseAction Run() override; |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_NONCHROMEOS_H_ |