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

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

Issue 423833002: Check if the delegate changed the visibility of child MenuItemViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added test Created 6 years, 5 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 | « ui/views/controls/menu/menu_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_item_view.cc
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index 0583ff1e9208ddb9822af9dd51b612917bde6e29..f24c61059c6333bb53162fc66a3a579778e1b25a 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -254,6 +254,8 @@ MenuItemView* MenuItemView::AddMenuItemAt(
item->SetIcon(icon);
if (type == SUBMENU)
item->CreateSubmenu();
+ if (GetDelegate() && !GetDelegate()->IsCommandVisible(item_id))
sky 2014/07/28 15:53:17 Can you also update MenuModelAdapter. Specifically
Joao da Silva 2014/07/28 16:12:49 Done.
+ item->SetVisible(false);
submenu_->AddChildViewAt(item, index);
return item;
}
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698