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

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

Issue 162973002: [IME] Releases key events to default handler if no handler in the active IME extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698