Index: chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc |
=================================================================== |
--- chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc (revision 99616) |
+++ chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc (working copy) |
@@ -110,3 +110,20 @@ |
return false; |
} |
} |
+ |
+void RenderViewContextMenuViews::UpdateMenuItem(int command_id, |
+ bool enabled, |
+ const string16& title) { |
+ views::MenuItemView* item = menu_->GetMenuItemByID(command_id); |
+ if (!item) |
+ return; |
+ |
+ item->SetEnabled(enabled); |
+ item->SetTitle(UTF16ToWide(title)); |
+ |
+ views::MenuItemView* parent = item->GetParentMenuItem(); |
+ if (!parent) |
+ return; |
+ |
+ parent->ChildrenChanged(); |
+} |