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

Unified Diff: chrome/browser/views/wrench_menu.cc

Issue 3289001: Adds support for invisible menu items to bookmark menus and wires it (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | views/controls/menu/submenu_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/wrench_menu.cc
diff --git a/chrome/browser/views/wrench_menu.cc b/chrome/browser/views/wrench_menu.cc
index 56971156f7b3b25fa37156aeb5fecd56085d7ff8..bc7ee5ab68823066bc61d4e671deaf998be64b7c 100644
--- a/chrome/browser/views/wrench_menu.cc
+++ b/chrome/browser/views/wrench_menu.cc
@@ -706,6 +706,9 @@ MenuItemView* WrenchMenu::AppendMenuItem(MenuItemView* parent,
MenuItemView* menu_item = parent->AppendMenuItemImpl(id, label, icon, type);
+ if (menu_item)
+ menu_item->SetVisible(model->IsVisibleAt(index));
+
if (menu_type == MenuModel::TYPE_COMMAND && model->HasIcons()) {
SkBitmap icon;
if (model->GetIconAt(index, &icon))
« no previous file with comments | « no previous file | views/controls/menu/submenu_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698