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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 6354021: Disable context menu for page_action and infobars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk version fixed Created 9 years, 11 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/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 177d4224e9df7cc62f12adb7faf9f878e6399fed..84ceb5e67f23eee52b3d80f8507896c22074eac2 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -1521,11 +1521,13 @@ gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed(
const Extension* extension = profile_->GetExtensionService()->
GetExtensionById(page_action()->extension_id(), false);
- context_menu_model_ =
- new ExtensionContextMenuModel(extension, owner_->browser_, this);
- context_menu_.reset(
- new MenuGtk(NULL, context_menu_model_.get()));
- context_menu_->Popup(sender, event);
+ if (extension->ShowConfigureContextMenus()) {
+ context_menu_model_ =
+ new ExtensionContextMenuModel(extension, owner_->browser_, this);
+ context_menu_.reset(
+ new MenuGtk(NULL, context_menu_model_.get()));
+ context_menu_->Popup(sender, event);
+ }
}
return TRUE;
« no previous file with comments | « chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/browser/ui/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698