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

Unified Diff: ui/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 8 years, 11 months 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/menu_host_root_view.h ('k') | ui/views/controls/menu/submenu_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_host_root_view.cc
diff --git a/ui/views/controls/menu/menu_host_root_view.cc b/ui/views/controls/menu/menu_host_root_view.cc
index 44ed97f0ba8e9b842d6042cfa3c96966f3fa89e3..b8753f572ff91ae83f9d094f732c4b5e0e462550 100644
--- a/ui/views/controls/menu/menu_host_root_view.cc
+++ b/ui/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)
sadrul 2012/01/19 15:29:29 Why is this ifdef necessary? My understanding is o
+ // 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.
+ return RootView::OnGestureEvent(event);
+#endif
+}
+
MenuController* MenuHostRootView::GetMenuController() {
return submenu_ ? submenu_->GetMenuItem()->GetMenuController() : NULL;
}
« no previous file with comments | « ui/views/controls/menu/menu_host_root_view.h ('k') | ui/views/controls/menu/submenu_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698