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

Unified Diff: views/controls/menu/submenu_view.h

Issue 2742003: Adds support for showing accelerators in bookmark menus. (Closed)
Patch Set: Added GetAcceleratorText Created 10 years, 6 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
« no previous file with comments | « views/controls/menu/menu_item_view_win.cc ('k') | views/controls/menu/submenu_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/submenu_view.h
diff --git a/views/controls/menu/submenu_view.h b/views/controls/menu/submenu_view.h
index afef314cf648321dbc36d56ed5146409fbee9772..62d8aa62e2999f0cbf9126c08ec446c959690539 100644
--- a/views/controls/menu/submenu_view.h
+++ b/views/controls/menu/submenu_view.h
@@ -125,6 +125,10 @@ class SubmenuView : public View {
// references to the MenuHost as the MenuHost is about to be deleted.
void MenuHostDestroyed();
+ // Max width of accelerators in child menu items. This doesn't include
+ // children's children, only direct children.
+ int max_accelerator_width() const { return max_accelerator_width_; }
+
// Padding around the edges of the submenu.
static const int kSubmenuBorderSize;
@@ -159,6 +163,9 @@ class SubmenuView : public View {
// Ancestor of the SubmenuView, lazily created.
MenuScrollViewContainer* scroll_view_container_;
+ // See description above getter.
+ int max_accelerator_width_;
+
DISALLOW_COPY_AND_ASSIGN(SubmenuView);
};
« no previous file with comments | « views/controls/menu/menu_item_view_win.cc ('k') | views/controls/menu/submenu_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698