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

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

Issue 2876203003: Make shelf item can be dragged when context menu is opened.
Patch Set: Created 3 years, 7 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 484b90889320a3c7c05724aacfbab234382db741..5c3aad19f4ba60da12c09d96ce63602f1bb5f8a7 100644
--- a/ui/views/controls/menu/menu_host.h
+++ b/ui/views/controls/menu/menu_host.h
@@ -46,14 +46,15 @@ class MenuHost : public Widget {
void InitMenuHost(Widget* parent,
const gfx::Rect& bounds,
View* contents_view,
- bool do_capture);
+ bool do_capture,
+ bool cancel_active_touches);
// Returns true if the menu host is visible.
bool IsMenuHostVisible();
// Shows the menu host. If |do_capture| is true the menu host should do a
// mouse grab.
- void ShowMenuHost(bool do_capture);
+ void ShowMenuHost(bool do_capture, bool cancel_active_touches);
// Hides the menu host.
void HideMenuHost();
@@ -67,6 +68,8 @@ class MenuHost : public Widget {
// Releases a mouse grab installed by |ShowMenuHost|.
void ReleaseMenuHostCapture();
+ void TransferEvents(Widget* source, Widget* target);
+
private:
friend class test::MenuControllerTest;
@@ -81,6 +84,7 @@ class MenuHost : public Widget {
// The view we contain.
SubmenuView* submenu_;
+ Widget* owner_ = NULL;
// If true, DestroyMenuHost has been invoked.
bool destroying_;

Powered by Google App Engine
This is Rietveld 408576698