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

Unified Diff: ash/wm/window_manager_unittest.cc

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/user_activity_detector_unittest.cc ('k') | ash/wm/workspace/workspace_event_handler.h » ('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 773a4a6e37ee0166bd1fdc0ae66877cb4ade4476..2328850c6b9964298e67a55604762c9a74c95a2c 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -62,9 +62,12 @@ class CustomEventHandler : public aura::test::TestEventHandler {
event->StopPropagation();
}
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- ui::EventResult result = aura::test::TestEventHandler::OnMouseEvent(event);
- return mouse_result_ == ui::ER_UNHANDLED ? result : mouse_result_;
+ virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ aura::test::TestEventHandler::OnMouseEvent(event);
+ if (mouse_result_ & ui::ER_HANDLED)
+ event->SetHandled();
+ if (mouse_result_ & ui::ER_CONSUMED)
+ event->StopPropagation();
}
private:
« no previous file with comments | « ash/wm/user_activity_detector_unittest.cc ('k') | ash/wm/workspace/workspace_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698