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

Unified Diff: ash/wm/window_manager_unittest.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 | « ash/wm/window_cycle_controller.cc ('k') | ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_manager_unittest.cc
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 98568e4189b8a3d90593220f00642bf7cb00dde5..773a4a6e37ee0166bd1fdc0ae66877cb4ade4476 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -54,9 +54,12 @@ class CustomEventHandler : public aura::test::TestEventHandler {
}
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- ui::EventResult result = aura::test::TestEventHandler::OnKeyEvent(event);
- return key_result_ == ui::ER_UNHANDLED ? result : key_result_;
+ virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ aura::test::TestEventHandler::OnKeyEvent(event);
+ if (key_result_ & ui::ER_HANDLED)
+ event->SetHandled();
+ if (key_result_ & ui::ER_CONSUMED)
+ event->StopPropagation();
}
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698