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

Unified Diff: ui/views/controls/menu/menu_message_loop.h

Issue 1565013002: Don't send touch events to windows like menus when the touch occurs outside the menu bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build redness Created 4 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
Index: ui/views/controls/menu/menu_message_loop.h
diff --git a/ui/views/controls/menu/menu_message_loop.h b/ui/views/controls/menu/menu_message_loop.h
index d4d56333d60f5fa6e5dd35ed63477d2b130cbd8c..b7567eb67b94146be67925e9a7be5c865c6cd78f 100644
--- a/ui/views/controls/menu/menu_message_loop.h
+++ b/ui/views/controls/menu/menu_message_loop.h
@@ -5,6 +5,7 @@
#ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
#define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
+#include "ui/events/event.h"
#include "ui/gfx/native_widget_types.h"
namespace gfx {
@@ -31,7 +32,10 @@ class MenuMessageLoop {
// Repost |event| to |window|.
// |screen_loc| is the event's location in screen coordinates.
- static void RepostEventToWindow(const ui::LocatedEvent& event,
+ // The |EventType| template argument indicates the type of the event.
+ // For e.g. MouseEvent, TouchEvent, etc.
+ template<class EventType>
+ static void RepostEventToWindow(const EventType& event,
gfx::NativeWindow window,
const gfx::Point& screen_loc);

Powered by Google App Engine
This is Rietveld 408576698