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

Unified Diff: chrome/browser/ui/views/location_bar/page_action_image_view.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
« no previous file with comments | « chrome/browser/ui/views/infobars/extension_infobar.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index 20a09532ce43ced0d4fab69963170899cbbbb74c..86e2f4bd30991e075b8846147ba77c724d47fa30 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -152,6 +152,9 @@ void PageActionImageView::ShowContextMenu(const gfx::Point& p,
bool is_mouse_gesture) {
const Extension* extension = profile_->GetExtensionService()->
GetExtensionById(page_action()->extension_id(), false);
+ if (!extension->ShowConfigureContextMenus())
+ return;
+
Browser* browser = BrowserView::GetBrowserViewForNativeWindow(
platform_util::GetTopLevel(GetWidget()->GetNativeView()))->browser();
context_menu_contents_ =
« no previous file with comments | « chrome/browser/ui/views/infobars/extension_infobar.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698