Index: chrome/browser/extensions/extension_toolbar_model.h |
diff --git a/chrome/browser/extensions/extension_toolbar_model.h b/chrome/browser/extensions/extension_toolbar_model.h |
index df01de5d17281de69b7072048f8efca77b573e26..1e27dc9d5c66d5bc47a9f81c36ddf9f6dba5f4e7 100644 |
--- a/chrome/browser/extensions/extension_toolbar_model.h |
+++ b/chrome/browser/extensions/extension_toolbar_model.h |
@@ -48,6 +48,11 @@ class ExtensionToolbarModel : public content::NotificationObserver { |
virtual void BrowserActionMoved(const extensions::Extension* extension, |
int index) {} |
+ // The browser action button for |extension| should show the popup now if it |
+ // is in the active window. |
+ virtual void BrowserActionShowPopup(const extensions::Extension* extension) |
+ {} |
+ |
// Called when the model has finished loading. |
virtual void ModelLoaded() {} |
@@ -62,7 +67,13 @@ class ExtensionToolbarModel : public content::NotificationObserver { |
// Executes the browser action for an extension and returns the action that |
// the UI should perform in response. |
// |popup_url_out| will be set if the extension should show a popup, with |
- // the URL that should be shown, if non-NULL. |
+ // the URL that should be shown, if non-NULL. |should_grant| controls whether |
+ // the browser action should grant the page tab permissions. The showPopup API |
+ // does not grant permissions. |
+ Action ExecuteBrowserAction(const extensions::Extension* extension, |
+ Browser* browser, |
+ GURL* popup_url_out, |
+ bool should_grant); |
Action ExecuteBrowserAction(const extensions::Extension* extension, |
Browser* browser, |
GURL* popup_url_out); |
@@ -85,6 +96,9 @@ class ExtensionToolbarModel : public content::NotificationObserver { |
void OnExtensionToolbarPrefChange(); |
+ // Tells observers to display a popup without granting tab permissions. |
+ void ShowBrowserActionPopup(const extensions::Extension* extension); |
+ |
private: |
// content::NotificationObserver implementation. |
virtual void Observe(int type, |