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

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

Issue 284903002: Only dispatch menu events if they have a valid target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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_controller.h
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index 910d3809f8276930c4e630f7cf2cfa84dedeabd1..56a0d92306757125962e3da27e9846be295db0ab 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -91,6 +91,10 @@ class VIEWS_EXPORT MenuController : public WidgetObserver {
// Whether or not drag operation is in progress.
bool drag_in_progress() const { return drag_in_progress_; }
+ // Returns the owner of child windows.
+ // WARNING: this may be NULL.
+ Widget* owner() { return owner_; }
+
// Get the anchor position wich is used to show this menu.
MenuAnchorPosition GetAnchorPosition() { return state_.anchor; }

Powered by Google App Engine
This is Rietveld 408576698