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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu_gtk.cc

Issue 8370033: Add a 'hidden' parameter to RenderViewContextMenuProxy::UpdateMenuItem(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: chrome/browser/tab_contents/render_view_context_menu_gtk.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu_gtk.cc (revision 106885)
+++ chrome/browser/tab_contents/render_view_context_menu_gtk.cc (working copy)
@@ -128,6 +128,7 @@
void RenderViewContextMenuGtk::UpdateMenuItem(int command_id,
bool enabled,
+ bool hidden,
const string16& title) {
GtkWidget* item = GetMenuItemByID(&menu_model_, menu_gtk_->widget(),
command_id);
@@ -136,5 +137,9 @@
// Enable (or disable) the menu item and updates its text.
gtk_widget_set_sensitive(item, enabled);
+ if (hidden)
+ gtk_widget_hide(item);
+ else
+ gtk_widget_show(item);
gtk_menu_item_set_label(GTK_MENU_ITEM(item), UTF16ToUTF8(title).c_str());
}
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu_gtk.h ('k') | chrome/browser/tab_contents/render_view_context_menu_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698