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

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

Issue 10832360: Change to address default selection of menu item (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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_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_;

Powered by Google App Engine
This is Rietveld 408576698