summaryrefslogtreecommitdiffstats
path: root/ui/views/controls/menu/menu_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views/controls/menu/menu_controller.h')
-rw-r--r--ui/views/controls/menu/menu_controller.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index 1e5985c3..66caa36 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -86,6 +86,9 @@ class VIEWS_EXPORT MenuController
// Whether or not drag operation is in progress.
bool drag_in_progress() const { return drag_in_progress_; }
+ // Get the anchor position wich is used to show this menu.
+ MenuItemView::AnchorPosition GetAnchorPosition() { return state_.anchor; }
+
// Cancels the current Run. See ExitType for a description of what happens
// with the various parameters.
void Cancel(ExitType type);
@@ -376,6 +379,12 @@ class VIEWS_EXPORT MenuController
bool prefer_leading,
bool* is_leading);
+ // Calculates the bubble bounds of the menu to show. is_leading is set to
+ // match the direction the menu opened in.
+ gfx::Rect CalculateBubbleMenuBounds(MenuItemView* item,
+ bool prefer_leading,
+ bool* is_leading);
+
// Returns the depth of the menu.
static int MenuDepth(MenuItemView* item);