Chromium Code Reviews| Index: chrome/browser/extensions/api/input_ime/input_ime_api.cc |
| diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc |
| index 07670feb37fe5f3c134fb6b35376749aeba97325..ce660be8745ba176801ba58691705cb8f25316f9 100644 |
| --- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc |
| +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc |
| @@ -164,6 +164,18 @@ class ImeObserver : public InputMethodEngineInterface::Observer { |
| if (profile_ == NULL || extension_id_.empty()) |
| return; |
| + if (!extensions::ExtensionSystem::Get(profile_) |
|
Hiro Komatsu
2014/02/13 09:39:50
Please add a comment above this block.
Shu Chen
2014/02/13 13:13:41
Done.
|
| + ->event_router() |
| + ->ExtensionHasEventListener(extension_id_, |
| + input_ime::OnKeyEvent::kEventName)) { |
| + InputMethodEngineInterface* engine = |
|
Hiro Komatsu
2014/02/13 09:39:50
How about calling InputImeEventRouter::OnKeyEventH
Shu Chen
2014/02/13 13:13:41
I had thought about it. To use InputImeEventRouter
Hiro Komatsu
2014/02/14 05:04:06
I see the point. Since AddRequest is not so expen
|
| + extensions::InputImeEventRouter::GetInstance()->GetActiveEngine( |
| + extension_id_); |
| + if (engine) |
| + engine->KeyEventDone(key_data, false); |
| + return; |
| + } |
| + |
| std::string request_id = |
| extensions::InputImeEventRouter::GetInstance()->AddRequest(engine_id, |
| key_data); |