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

Unified Diff: ui/views/controls/scroll_view.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/controls/scroll_view.h ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scroll_view.cc
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc
index b85553f6e4c908eaf35915cf1a745857a949f6ef..b05f79859008037947caf197261bd7ca0224fe20 100644
--- a/ui/views/controls/scroll_view.cc
+++ b/ui/views/controls/scroll_view.cc
@@ -433,9 +433,7 @@ bool ScrollView::OnKeyPressed(const ui::KeyEvent& event) {
return processed;
}
-ui::EventResult ScrollView::OnGestureEvent(ui::GestureEvent* event) {
- ui::EventResult status = ui::ER_UNHANDLED;
-
+void ScrollView::OnGestureEvent(ui::GestureEvent* event) {
// If the event happened on one of the scrollbars, then those events are
// sent directly to the scrollbars. Otherwise, only scroll events are sent to
// the scrollbars.
@@ -446,13 +444,12 @@ ui::EventResult ScrollView::OnGestureEvent(ui::GestureEvent* event) {
if (vert_sb_->visible()) {
if (vert_sb_->bounds().Contains(event->location()) || scroll_event)
- status = vert_sb_->OnGestureEvent(event);
+ vert_sb_->OnGestureEvent(event);
}
- if (status == ui::ER_UNHANDLED && horiz_sb_->visible()) {
+ if (!event->handled() && horiz_sb_->visible()) {
if (horiz_sb_->bounds().Contains(event->location()) || scroll_event)
- status = horiz_sb_->OnGestureEvent(event);
+ horiz_sb_->OnGestureEvent(event);
}
- return status;
}
bool ScrollView::OnMouseWheel(const ui::MouseWheelEvent& e) {
« no previous file with comments | « ui/views/controls/scroll_view.h ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698