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

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

Issue 378333003: Allow menus to stay open during a child view's drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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_controller.h
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index 30c56f0f04b88d9f36b68454c3851f526f5a1533..77cad7e207b2c38a1dc8a359cea7a6e13ac755d2 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -92,6 +92,14 @@ class VIEWS_EXPORT MenuController : public WidgetObserver {
// Whether or not drag operation is in progress.
bool drag_in_progress() const { return drag_in_progress_; }
+ // Since general Views and MenuItemViews have different mechanisms for
+ // implementing drag, it is possible that a child view will want to use
+ // its own dragging, in which case it needs to notify the controller that
+ // a drag is in progress to avoid closing the active menu.
+ void set_drag_in_progress(bool drag_in_progress) {
+ drag_in_progress_ = drag_in_progress;
+ }
+
// Returns the owner of child windows.
// WARNING: this may be NULL.
Widget* owner() { return owner_; }

Powered by Google App Engine
This is Rietveld 408576698