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

Unified Diff: chrome/browser/extensions/extension_input_api.cc

Issue 6675005: Integrate the new input method API for Views into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add some DCHECKs. Created 9 years, 9 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/extension_input_api.cc
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index 6adfb355d6a4dd9dc513a5602c4781a3faa4f588..ce47ea572ab65d3ed46af29d9b0a6fb71a306dd7 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -17,6 +17,8 @@
#include "content/common/native_web_keyboard_event.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "views/events/event.h"
+#include "views/ime/input_method.h"
+#include "views/widget/widget.h"
#include "views/widget/root_view.h"
namespace {
@@ -120,7 +122,10 @@ bool SendKeyboardEventInputFunction::RunImpl() {
}
views::KeyEvent event(type, prototype_event.key_code(), flags);
- if (!root_view->ProcessKeyEvent(event)) {
+ views::InputMethod* ime = root_view->GetWidget()->GetInputMethod();
+ if (ime) {
+ ime->DispatchKeyEvent(event);
+ } else if (!root_view->ProcessKeyEvent(event)) {
error_ = kKeyEventUnprocessedError;
return false;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.h » ('j') | views/controls/textfield/native_textfield_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698