Index: ui/views/controls/menu/menu_controller.h |
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h |
index b550ad75ba57883ff1a6d25eab4af80d6a2a4306..1d799bd952f3167e7e6061fba6ca1a52c04e0601 100644 |
--- a/ui/views/controls/menu/menu_controller.h |
+++ b/ui/views/controls/menu/menu_controller.h |
@@ -151,6 +151,7 @@ class VIEWS_EXPORT MenuController : public WidgetObserver { |
void OnMouseEntered(SubmenuView* source, const ui::MouseEvent& event); |
bool OnMouseWheel(SubmenuView* source, const ui::MouseWheelEvent& event); |
void OnGestureEvent(SubmenuView* source, ui::GestureEvent* event); |
+ void OnTouchEvent(SubmenuView* source, ui::TouchEvent* event); |
View* GetTooltipHandlerForPoint(SubmenuView* source, const gfx::Point& point); |
void ViewHierarchyChanged(SubmenuView* source, |
const View::ViewHierarchyChangedDetails& details); |
@@ -306,8 +307,11 @@ class VIEWS_EXPORT MenuController : public WidgetObserver { |
// to show/hide submenus and update state_. |
void SetSelection(MenuItemView* menu_item, int types); |
+ // The |EventType| template argument indicates the type of the event. |
+ // For e.g. MouseEvent, TouchEvent, etc. |
+ template<class EventType> |
void SetSelectionOnPointerDown(SubmenuView* source, |
- const ui::LocatedEvent& event); |
+ const EventType& event); |
void StartDrag(SubmenuView* source, const gfx::Point& location); |
// Key processing. |
@@ -502,7 +506,10 @@ class VIEWS_EXPORT MenuController : public WidgetObserver { |
// On non-aura Windows, a new mouse event is generated and posted to |
// the window (if there is one) at the location of the event. On |
// aura, the event is reposted on the RootWindow. |
- void RepostEvent(SubmenuView* source, const ui::LocatedEvent& event); |
+ // The |EventType| template argument indicates the type of the event. |
+ // For e.g. MouseEvent, TouchEvent, etc. |
+ template<class EventType> |
sky
2016/01/12 21:16:42
I'm not seeing why you need the template args.
ananta
2016/01/13 01:21:24
Replaced with LocatedEvent* here and other places.
|
+ void RepostEvent(SubmenuView* source, const EventType& event); |
// Sets the drop target to new_item. |
void SetDropMenuItem(MenuItemView* new_item, |