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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_action_button.mm

Issue 197333005: Disabled context menu for external component extension icon on MAC (to be consistent with Windows). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_action_button.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
index 6879d92b07715b6dd6afb073c881072f8904aaab..7cd63feb945ff2eefd754f42cadafef2b5c57e43 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
@@ -149,14 +149,16 @@ class ExtensionActionIconFactoryBridge
[self setButtonType:NSMomentaryChangeButton];
[self setShowsBorderOnlyWhileMouseInside:YES];
- contextMenuController_.reset([[ExtensionActionContextMenuController alloc]
- initWithExtension:extension
- browser:browser
- extensionAction:browser_action]);
- base::scoped_nsobject<NSMenu> contextMenu(
- [[NSMenu alloc] initWithTitle:@""]);
- [contextMenu setDelegate:self];
- [self setMenu:contextMenu];
+ if (extension->ShowConfigureContextMenus()) {
+ contextMenuController_.reset([[ExtensionActionContextMenuController alloc]
+ initWithExtension:extension
+ browser:browser
+ extensionAction:browser_action]);
+ base::scoped_nsobject<NSMenu> contextMenu(
+ [[NSMenu alloc] initWithTitle:@""]);
+ [contextMenu setDelegate:self];
+ [self setMenu:contextMenu];
+ }
tabId_ = tabId;
extension_ = extension;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698