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

Unified Diff: chrome/browser/extensions/api/extension_action/extension_action_api.h

Issue 496403003: Remove NOTIFICATION_EXTENSION_PAGE_ACTIONS_UPDATED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ 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/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 171f8e4d964192eaf1f5f312fabebf45e9d3c355..11cec0e03fe77be67798ec2053e00fcd012f023f 100644
--- a/chrome/browser/extensions/api/extension_action/extension_action_api.h
+++ b/chrome/browser/extensions/api/extension_action/extension_action_api.h
@@ -44,14 +44,18 @@ 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.
- virtual void OnExtensionActionAPIShuttingDown() {}
+ virtual void OnExtensionActionAPIShuttingDown();
protected:
- virtual ~Observer() {}
+ virtual ~Observer();
};
explicit ExtensionActionAPI(content::BrowserContext* context);
@@ -83,14 +87,19 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI {
Browser* browser,
bool grant_active_tab_permissions);
+ // 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>;

Powered by Google App Engine
This is Rietveld 408576698