Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3835)

Unified Diff: chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h

Issue 1570723002: Add class extensions::InputImeEventRouterBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9478db564e3ca2a70adb91776b414c68432ac76b 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,17 @@
#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 <string>
+#include <vector>
+
+#include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h"
+#include "chrome/common/extensions/api/input_ime/input_components_handler.h"
#include "extensions/browser/extension_function.h"
namespace extensions {
+class InputImeEventRouterBase;
Devlin 2016/01/11 22:18:57 you include the header, so no need for this.
Azure Wei 2016/01/12 01:55:53 Done.
+struct InputComponentInfo;
class InputImeSetCompositionFunction : public SyncExtensionFunction {
public:
@@ -138,6 +146,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);
+ 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_;
+
+ DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter);
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698