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

Unified Diff: views/controls/menu/native_menu_x.cc

Issue 5697005: Change SimpleMenuModel on OSX to support dynamic icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update after merge Created 10 years 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/native_menu_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/native_menu_x.cc
diff --git a/views/controls/menu/native_menu_x.cc b/views/controls/menu/native_menu_x.cc
index db47f7e273ace1a43de50e03c9d4465334d9d516..45f94465ab82b7da21d253cf5d27c0e273a17d9e 100644
--- a/views/controls/menu/native_menu_x.cc
+++ b/views/controls/menu/native_menu_x.cc
@@ -136,12 +136,14 @@ void NativeMenuX::UpdateMenuFromModel(SubmenuView* menu,
MenuItemView* mitem = menu->GetMenuItemAt(index - sep);
mitem->SetVisible(model->IsVisibleAt(index));
mitem->SetEnabled(model->IsEnabledAt(index));
- if (model->IsLabelDynamicAt(index)) {
+ if (model->IsItemDynamicAt(index)) {
mitem->SetTitle(UTF16ToWide(model->GetLabelAt(index)));
}
SkBitmap icon;
if (model->GetIconAt(index, &icon)) {
+ // TODO(atwilson): Support removing the icon dynamically
+ // (http://crbug.com/66508).
mitem->SetIcon(icon);
}
« no previous file with comments | « views/controls/menu/native_menu_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698