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

Unified Diff: ui/views/corewm/input_method_event_filter.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
« no previous file with comments | « ui/views/corewm/input_method_event_filter.h ('k') | ui/views/corewm/window_modality_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/input_method_event_filter.cc
diff --git a/ui/views/corewm/input_method_event_filter.cc b/ui/views/corewm/input_method_event_filter.cc
index f80d3ca6cc2127c11369cc5353a9bfcc15fe1432..d7a1d383de18b1e890b76640ecef9e10ad111d6b 100644
--- a/ui/views/corewm/input_method_event_filter.cc
+++ b/ui/views/corewm/input_method_event_filter.cc
@@ -37,14 +37,13 @@ void InputMethodEventFilter::SetInputMethodPropertyInRootWindow(
////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, EventFilter implementation:
-ui::EventResult InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
+void InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
const ui::EventType type = event->type();
if (type == ui::ET_TRANSLATED_KEY_PRESS ||
type == ui::ET_TRANSLATED_KEY_RELEASE) {
// The |event| is already handled by this object, change the type of the
// event to ui::ET_KEY_* and pass it to the next filter.
static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent();
- return ui::ER_UNHANDLED;
} else {
// If the focused window is changed, all requests to IME will be
// discarded so it's safe to update the target_root_window_ here.
@@ -55,7 +54,7 @@ ui::EventResult InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
input_method_->DispatchKeyEvent(event->native_event());
else
input_method_->DispatchFabricatedKeyEvent(*event);
- return ui::ER_CONSUMED;
+ event->StopPropagation();
}
}
« no previous file with comments | « ui/views/corewm/input_method_event_filter.h ('k') | ui/views/corewm/window_modality_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698