| Index: chrome/browser/extensions/api/extension_action/extension_action_api.h
|
| diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.h b/chrome/browser/extensions/api/extension_action/extension_action_api.h
|
| index ac29d1f786282b2c3bf8109ee37bdda65f991500..afd80bec59a974efd855deb0e19f3ffb1e55b924 100644
|
| --- a/chrome/browser/extensions/api/extension_action/extension_action_api.h
|
| +++ b/chrome/browser/extensions/api/extension_action/extension_action_api.h
|
| @@ -44,7 +44,11 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI {
|
| virtual void OnExtensionActionUpdated(
|
| ExtensionAction* extension_action,
|
| content::WebContents* web_contents,
|
| - content::BrowserContext* browser_context) = 0;
|
| + content::BrowserContext* browser_context) {}
|
| +
|
| + // Called when the page actions have been refreshed do to a possible change
|
| + // in count or visibility.
|
| + virtual void OnPageActionsUpdated(content::WebContents* web_contents) {}
|
|
|
| // Called when the ExtensionActionAPI is shutting down, giving observers a
|
| // chance to unregister themselves if there is not a definitive lifecycle.
|
| @@ -86,14 +90,19 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI {
|
| void AddObserver(Observer* observer);
|
| void RemoveObserver(Observer* observer);
|
|
|
| + // Notifies that there has been a change in the given |extension_action|.
|
| void NotifyChange(ExtensionAction* extension_action,
|
| content::WebContents* web_contents,
|
| content::BrowserContext* browser_context);
|
|
|
| // Clears the values for all ExtensionActions for the tab associated with the
|
| - // given |web_contents|.
|
| + // given |web_contents| (and signals that page actions changed).
|
| void ClearAllValuesForTab(content::WebContents* web_contents);
|
|
|
| + // Notifies that the current set of page actions for |web_contents| has
|
| + // changed, and signals the browser to update.
|
| + void NotifyPageActionsChanged(content::WebContents* web_contents);
|
| +
|
| private:
|
| friend class BrowserContextKeyedAPIFactory<ExtensionActionAPI>;
|
|
|
|
|