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

Unified Diff: views/controls/menu/menu_host_root_view.cc

Issue 8508024: Support touch scroll gestures in menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gardening. Created 9 years, 1 month 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
Index: views/controls/menu/menu_host_root_view.cc
diff --git a/views/controls/menu/menu_host_root_view.cc b/views/controls/menu/menu_host_root_view.cc
index b3676fa017d2c73ff4f40d19b23cff5c6b6438a3..a01a061d7364bcd79566a16c3d1dfd787775f01f 100644
--- a/views/controls/menu/menu_host_root_view.cc
+++ b/views/controls/menu/menu_host_root_view.cc
@@ -62,6 +62,19 @@ bool MenuHostRootView::OnMouseWheel(const MouseWheelEvent& event) {
#endif
}
+ui::GestureStatus MenuHostRootView::OnGestureEvent(const GestureEvent& event) {
+#if defined(OS_LINUX)
+ // ChromeOS uses MenuController to forward events like other
+ // mouse events.
+ if (!GetMenuController())
+ return ui::GESTURE_STATUS_UNKNOWN;
+ return GetMenuController()->OnGestureEvent(submenu_, event);
+#else
+ // TODO(vollick): gestures in Windows.
rjkroege 2012/01/19 16:15:08 you need to hook up with cpu about this I think
+ return RootView::OnGestureEvent(event);
+#endif
+}
+
MenuController* MenuHostRootView::GetMenuController() {
return submenu_ ? submenu_->GetMenuItem()->GetMenuController() : NULL;
}

Powered by Google App Engine
This is Rietveld 408576698