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

Unified Diff: chrome/browser/extensions/api/input/input.cc

Issue 11570012: events: Update key-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-for-landing Created 8 years 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/input.cc
diff --git a/chrome/browser/extensions/api/input/input.cc b/chrome/browser/extensions/api/input/input.cc
index e25f580a91769b0408b55a8ea944894a15b1d6ff..43c0e30145b200e16efae4e13cb4c22cfc0602fd 100644
--- a/chrome/browser/extensions/api/input/input.cc
+++ b/chrome/browser/extensions/api/input/input.cc
@@ -122,9 +122,12 @@ bool SendKeyboardEventInputFunction::RunImpl() {
views::InputMethod* ime = widget->GetInputMethod();
if (ime) {
ime->DispatchKeyEvent(event);
- } else if (!widget->OnKeyEvent(event)) {
- error_ = kKeyEventUnprocessedError;
- return false;
+ } else {
+ widget->OnKeyEvent(&event);
+ if (event.handled()) {
+ error_ = kKeyEventUnprocessedError;
+ return false;
+ }
}
return true;
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698