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

Unified Diff: ui/views/controls/menu/menu_host.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: Restore DCHECK 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_host.h
diff --git a/ui/views/controls/menu/menu_host.h b/ui/views/controls/menu/menu_host.h
index ef44bd06ddd60c90bec167ecad379e7f60c42742..ba931f8ed201dda2422230a39a280bbef8d4175c 100644
--- a/ui/views/controls/menu/menu_host.h
+++ b/ui/views/controls/menu/menu_host.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/views/widget/widget.h"
@@ -17,6 +18,13 @@ class SubmenuView;
class View;
class Widget;
+namespace internal {
+
+// This class is internal to views.
+class PreMenuEventDispatchHandler;
+
+} // internal
+
// SubmenuView uses a MenuHost to house the SubmenuView.
//
// SubmenuView owns the MenuHost. When SubmenuView is done with the MenuHost
@@ -73,6 +81,11 @@ class MenuHost : public Widget {
// If true and capture is lost we don't notify the delegate.
bool ignore_capture_lost_;
+#if !defined(OS_MACOSX)
+ // Handles raw touch events at the moment.
+ scoped_ptr<internal::PreMenuEventDispatchHandler> pre_dispatch_handler_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(MenuHost);
};

Powered by Google App Engine
This is Rietveld 408576698