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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/input/input.h" 5 #include "chrome/browser/extensions/api/input/input.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 flags, 115 flags,
116 prototype_event.is_char()); 116 prototype_event.is_char());
117 if (character) { 117 if (character) {
118 event.set_character(character); 118 event.set_character(character);
119 event.set_unmodified_character(character); 119 event.set_unmodified_character(character);
120 } 120 }
121 121
122 views::InputMethod* ime = widget->GetInputMethod(); 122 views::InputMethod* ime = widget->GetInputMethod();
123 if (ime) { 123 if (ime) {
124 ime->DispatchKeyEvent(event); 124 ime->DispatchKeyEvent(event);
125 } else if (!widget->OnKeyEvent(event)) { 125 } else {
126 error_ = kKeyEventUnprocessedError; 126 widget->OnKeyEvent(&event);
127 return false; 127 if (event.handled()) {
128 error_ = kKeyEventUnprocessedError;
129 return false;
130 }
128 } 131 }
129 132
130 return true; 133 return true;
131 } 134 }
132 135
133 } // namespace extensions 136 } // namespace extensions
OLDNEW
« 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