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

Unified Diff: ui/views/corewm/compound_event_filter.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/views/corewm/compound_event_filter.h ('k') | ui/views/corewm/compound_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/compound_event_filter.cc
diff --git a/ui/views/corewm/compound_event_filter.cc b/ui/views/corewm/compound_event_filter.cc
index 87c49812e6ff24b49742313dfc9387989f6bf0fb..fe83efd8f2b8697cd91e66e93c83242237482301 100644
--- a/ui/views/corewm/compound_event_filter.cc
+++ b/ui/views/corewm/compound_event_filter.cc
@@ -242,15 +242,13 @@ ui::EventResult CompoundEventFilter::OnTouchEvent(ui::TouchEvent* event) {
return result;
}
-ui::EventResult CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) {
- int result = ui::ER_UNHANDLED;
+void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) {
if (handlers_.might_have_observers()) {
ObserverListBase<ui::EventHandler>::Iterator it(handlers_);
ui::EventHandler* handler;
- while (!(result & ui::ER_CONSUMED) && (handler = it.GetNext()) != NULL)
- result |= handler->OnGestureEvent(event);
+ while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL)
+ handler->OnGestureEvent(event);
}
- return static_cast<ui::EventResult>(result);
}
} // namespace corewm
« no previous file with comments | « ui/views/corewm/compound_event_filter.h ('k') | ui/views/corewm/compound_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698