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

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

Issue 489183005: Make a ShowExtensionActionPopup function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Peter's Created 6 years, 4 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/cocoa/extensions/browser_actions_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index 2b3882fe5442a296c14a0f34f491b5af3971a678..10e12610232ca8dd96d5a1b49ee48bcc436ed118 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -242,7 +242,8 @@ class ExtensionServiceObserverBridge
[button updateState];
}
- virtual bool ShowExtensionActionPopup(const Extension* extension) OVERRIDE {
+ virtual bool ShowExtensionActionPopup(const Extension* extension,
+ bool grant_active_tab) OVERRIDE {
// Do not override other popups and only show in active window.
ExtensionPopupController* popup = [ExtensionPopupController popup];
if (popup || !browser_->window()->IsActive())
@@ -250,7 +251,7 @@ class ExtensionServiceObserverBridge
BrowserActionButton* button = [owner_ buttonForExtension:extension];
return button && [owner_ browserActionClicked:button
- shouldGrant:NO];
+ shouldGrant:grant_active_tab];
}
virtual void ToolbarVisibleCountChanged() OVERRIDE {
@@ -259,6 +260,10 @@ class ExtensionServiceObserverBridge
virtual void ToolbarHighlightModeChanged(bool is_highlighting) OVERRIDE {
}
+ virtual Browser* GetBrowser() OVERRIDE {
+ return browser_;
+ }
+
private:
// The object we need to inform when we get a notification. Weak. Owns us.
BrowserActionsController* owner_;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698