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

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

Issue 433163005: Refactoring for InputMethodEngine and InputMethodEventRouter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 6 years, 4 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.h
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h
index 773d13b4ae0b877af329677d7d181475161db73e..ac7f07d4c74897973cedd5145ab0f22d7b9197a4 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h
@@ -36,8 +36,9 @@ class InputImeEventRouter {
public:
static InputImeEventRouter* GetInstance();
- bool RegisterIme(const std::string& extension_id,
- const extensions::InputComponentInfo& component);
+ bool RegisterImeExtension(
+ const std::string& extension_id,
+ const std::vector<extensions::InputComponentInfo>& input_components);
void UnregisterAllImes(const std::string& extension_id);
chromeos::InputMethodEngineInterface* GetEngine(
const std::string& extension_id,
@@ -62,15 +63,7 @@ class InputImeEventRouter {
InputImeEventRouter();
~InputImeEventRouter();
- // The engine map for event routing.
- // { Profile : { extension_id : { engine_id : Engine } } }.
- // TODO(shuchen): reuse the engine map in InputMethodManagerImpl.
- typedef std::map<std::string, chromeos::InputMethodEngineInterface*>
- EngineMap;
- typedef std::map<std::string, EngineMap> ExtensionMap;
- typedef std::map<Profile*, ExtensionMap, ProfileCompare>
- ProfileEngineMap;
- ProfileEngineMap profile_engine_map_;
+ std::map<std::string, chromeos::InputMethodEngineInterface*> engine_map_;
unsigned int next_request_id_;
RequestMap request_map_;

Powered by Google App Engine
This is Rietveld 408576698