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

Unified Diff: ui/base/events/event_dispatcher_unittest.cc

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (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 | « ui/base/events/event.cc ('k') | ui/base/events/event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event_dispatcher_unittest.cc
diff --git a/ui/base/events/event_dispatcher_unittest.cc b/ui/base/events/event_dispatcher_unittest.cc
index 00eca7a56cbf7dd902273ef18536b20196e5c939..de6444dcfb3337b62bea2ebc22b236ebdf0ff909 100644
--- a/ui/base/events/event_dispatcher_unittest.cc
+++ b/ui/base/events/event_dispatcher_unittest.cc
@@ -100,9 +100,12 @@ class TestEventHandler : public EventHandler {
return event_result_;
}
- virtual EventResult OnGestureEvent(GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(GestureEvent* event) OVERRIDE {
ReceivedEvent(event);
- return event_result_;
+ if (event_result_ & ui::ER_CONSUMED)
+ event->StopPropagation();
+ if (event_result_ & ui::ER_HANDLED)
+ event->SetHandled();
}
int id_;
« no previous file with comments | « ui/base/events/event.cc ('k') | ui/base/events/event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698