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

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: Fix win_aura 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..56086ea1cf6789b6b0699e34d4270d60e2d8275a 100644
--- a/ui/views/controls/menu/menu_host_root_view.cc
+++ b/ui/views/controls/menu/menu_host_root_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,6 +62,14 @@ bool MenuHostRootView::OnMouseWheel(const MouseWheelEvent& event) {
#endif
}
+ui::GestureStatus MenuHostRootView::OnGestureEvent(const GestureEvent& event) {
+ // ChromeOS uses MenuController to forward events like other
+ // mouse events.
+ if (!GetMenuController())
+ return ui::GESTURE_STATUS_UNKNOWN;
+ return GetMenuController()->OnGestureEvent(submenu_, event);
+}
+
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