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

Unified Diff: ui/views/controls/menu/submenu_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/menu/submenu_view.h ('k') | ui/views/controls/scroll_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/submenu_view.cc
diff --git a/ui/views/controls/menu/submenu_view.cc b/ui/views/controls/menu/submenu_view.cc
index 71da3263c79cb0462b3ec116268e1c7d8fa030eb..0ace2d15192f5bc9676225815c49f1b1b850f143 100644
--- a/ui/views/controls/menu/submenu_view.cc
+++ b/ui/views/controls/menu/submenu_view.cc
@@ -260,8 +260,8 @@ bool SubmenuView::OnMouseWheel(const ui::MouseWheelEvent& e) {
return true;
}
-ui::EventResult SubmenuView::OnGestureEvent(ui::GestureEvent* event) {
- ui::EventResult to_return = ui::ER_CONSUMED;
+void SubmenuView::OnGestureEvent(ui::GestureEvent* event) {
+ bool handled = true;
switch (event->type()) {
case ui::ET_GESTURE_SCROLL_BEGIN:
scroll_animator_->Stop();
@@ -280,10 +280,11 @@ ui::EventResult SubmenuView::OnGestureEvent(ui::GestureEvent* event) {
scroll_animator_->Stop();
break;
default:
- to_return = ui::ER_UNHANDLED;
+ handled = false;
break;
}
- return to_return;
+ if (handled)
+ event->SetHandled();
}
bool SubmenuView::IsShowing() {
« no previous file with comments | « ui/views/controls/menu/submenu_view.h ('k') | ui/views/controls/scroll_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698