Index: ui/views/controls/menu/menu_item_view.h |
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h |
index c80a1d3b38db280d8d6bccee66b8c27e39769f81..c0d62bc501ff3b13205563123f604f713b3940df 100644 |
--- a/ui/views/controls/menu/menu_item_view.h |
+++ b/ui/views/controls/menu/menu_item_view.h |
@@ -290,6 +290,9 @@ class VIEWS_EXPORT MenuItemView : public View { |
// item. |
bool has_mnemonics() const { return has_mnemonics_; } |
+ // Returns true if the menu is the root layer of a context menu. |
+ bool is_root_context_menu() const { return is_root_context_menu_; } |
+ |
// Set top and bottom margins in pixels. If no margin is set or a |
// negative margin is specified then MenuConfig values are used. |
void SetMargins(int top_margin, int bottom_margin); |
@@ -333,7 +336,8 @@ class VIEWS_EXPORT MenuItemView : public View { |
// The RunXXX methods call into this to set up the necessary state before |
// running. |
- void PrepareForRun(bool has_mnemonics, bool show_mnemonics); |
+ void PrepareForRun(bool has_mnemonics, bool show_mnemonics, |
+ bool is_root_context_menu); |
// Returns the flags passed to DrawStringInt. |
int GetDrawStringFlags(); |
@@ -437,6 +441,9 @@ class VIEWS_EXPORT MenuItemView : public View { |
// MenuConfig says mnemonics should be shown. Only used on the root menu item. |
bool show_mnemonics_; |
+ // Is this menu the root layer of a context menu |
+ bool is_root_context_menu_; |
+ |
// Set if menu has icons or icon_views (applies to root menu item only). |
bool has_icons_; |