Chromium Code Reviews| 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; |
| } |