Index: ui/views/controls/menu/menu_message_loop_mac.cc |
diff --git a/ui/views/controls/menu/menu_message_loop_mac.cc b/ui/views/controls/menu/menu_message_loop_mac.cc |
index c443ce9beb40c0aa6390806359747b1565606ff7..2b79cce4e9e0618acbe2859dd92d2704f53e5117 100644 |
--- a/ui/views/controls/menu/menu_message_loop_mac.cc |
+++ b/ui/views/controls/menu/menu_message_loop_mac.cc |
@@ -17,8 +17,34 @@ MenuMessageLoop* MenuMessageLoop::Create() { |
return new MenuMessageLoopMac; |
} |
+// Force instantiation of the RepostEventToWindow function for the following |
+// EventTypes. |
+// 1. MouseEvent. |
+// 2. GestureEvent. |
+// 3. TouchEvent. |
+// Alternatively we could possibly implement the function in the header file, |
+// which I think is uglier. |
+template |
+void MenuMessageLoop::RepostEventToWindow<ui::MouseEvent>( |
+ const ui::MouseEvent& event, |
+ gfx::NativeWindow window, |
+ const gfx::Point& screen_loc); |
+ |
+template |
+void MenuMessageLoop::RepostEventToWindow<ui::GestureEvent>( |
+ const ui::GestureEvent& event, |
+ gfx::NativeWindow window, |
+ const gfx::Point& screen_loc); |
+ |
+template |
+void MenuMessageLoop::RepostEventToWindow<ui::TouchEvent>( |
+ const ui::TouchEvent& event, |
+ gfx::NativeWindow window, |
+ const gfx::Point& screen_loc); |
+ |
// static |
-void MenuMessageLoop::RepostEventToWindow(const ui::LocatedEvent& event, |
+template<class EventType> |
+void MenuMessageLoop::RepostEventToWindow(const EventType& event, |
gfx::NativeWindow window, |
const gfx::Point& screen_loc) { |
NOTIMPLEMENTED(); |