| 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 530340a560f8ecb16b3f888091e857261f23e2b9..403a9b7a572f26f8b26a257b98741d6517c21ddf 100644
|
| --- a/chrome/browser/extensions/extension_toolbar_model.h
|
| +++ b/chrome/browser/extensions/extension_toolbar_model.h
|
| @@ -22,6 +22,14 @@ class ExtensionToolbarModel : public content::NotificationObserver {
|
| explicit ExtensionToolbarModel(ExtensionService* service);
|
| virtual ~ExtensionToolbarModel();
|
|
|
| + // The action that should be taken as a result of clicking a browser action.
|
| + enum Action {
|
| + ACTION_NONE,
|
| + ACTION_SHOW_POPUP,
|
| + // Unlike ActionBoxController there is no ACTION_SHOW_CONTEXT_MENU, because
|
| + // UI implementations tend to handle this themselves at a higher level.
|
| + };
|
| +
|
| // A class which is informed of changes to the model; represents the view of
|
| // MVC.
|
| class Observer {
|
| @@ -38,11 +46,6 @@ class ExtensionToolbarModel : public content::NotificationObserver {
|
| virtual void BrowserActionMoved(const extensions::Extension* extension,
|
| int index) {}
|
|
|
| - // The browser action button for |extension_id| (which was not a popup) was
|
| - // clicked, executing it.
|
| - virtual void BrowserActionExecuted(const std::string& extension_id,
|
| - Browser* browser) {}
|
| -
|
| // Called when the model has finished loading.
|
| virtual void ModelLoaded() {}
|
|
|
| @@ -54,7 +57,13 @@ class ExtensionToolbarModel : public content::NotificationObserver {
|
| void AddObserver(Observer* observer);
|
| void RemoveObserver(Observer* observer);
|
| void MoveBrowserAction(const extensions::Extension* extension, int index);
|
| - void ExecuteBrowserAction(const std::string& extension_id, Browser* browser);
|
| + // 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.
|
| + Action ExecuteBrowserAction(const extensions::Extension* extension,
|
| + Browser* browser,
|
| + GURL* popup_url_out);
|
| // If count == size(), this will set the visible icon count to -1, meaning
|
| // "show all actions".
|
| void SetVisibleIconCount(int count);
|
|
|