summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_action_manager.h
diff options
context:
space:
mode:
authorlimasdf@gmail.com <limasdf@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 17:54:07 +0000
committerlimasdf@gmail.com <limasdf@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 17:54:07 +0000
commit01d3a96dcee287570877975aba7f1cd6dbdf2d96 (patch)
tree4cf147e3c18092f68abe7021f19b3cff4fa8a799 /chrome/browser/extensions/extension_action_manager.h
parentd662858c09277d99ecd1af7540630c8d1f9ea055 (diff)
downloadchromium_src-01d3a96dcee287570877975aba7f1cd6dbdf2d96.zip
chromium_src-01d3a96dcee287570877975aba7f1cd6dbdf2d96.tar.gz
chromium_src-01d3a96dcee287570877975aba7f1cd6dbdf2d96.tar.bz2
Remove some NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED.
BUG=354046 R=kalman@chromium.org CC=DHNishi@gmail.com Review URL: https://codereview.chromium.org/234883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_action_manager.h')
-rw-r--r--chrome/browser/extensions/extension_action_manager.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/extensions/extension_action_manager.h b/chrome/browser/extensions/extension_action_manager.h
index fc50b083..d8f5b91 100644
--- a/chrome/browser/extensions/extension_action_manager.h
+++ b/chrome/browser/extensions/extension_action_manager.h
@@ -9,9 +9,9 @@
#include <string>
#include "base/memory/linked_ptr.h"
+#include "base/scoped_observer.h"
#include "components/keyed_service/core/keyed_service.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/extension_registry_observer.h"
class ExtensionAction;
class Profile;
@@ -19,11 +19,12 @@ class Profile;
namespace extensions {
class Extension;
+class ExtensionRegistry;
// Owns the ExtensionActions associated with each extension. These actions live
// while an extension is loaded and are destroyed on unload.
class ExtensionActionManager : public KeyedService,
- public content::NotificationObserver {
+ public ExtensionRegistryObserver {
public:
explicit ExtensionActionManager(Profile* profile);
virtual ~ExtensionActionManager();
@@ -42,14 +43,16 @@ class ExtensionActionManager : public KeyedService,
const extensions::Extension& extension) const;
private:
- // Implement content::NotificationObserver.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // Implement ExtensionRegistryObserver.
+ virtual void OnExtensionUnloaded(content::BrowserContext* browser_context,
+ const Extension* extension) OVERRIDE;
- content::NotificationRegistrar registrar_;
Profile* profile_;
+ // Listen to extension unloaded notifications.
+ ScopedObserver<ExtensionRegistry,
+ ExtensionRegistryObserver> scoped_extension_registry_observer_;
+
// Keyed by Extension ID. These maps are populated lazily when their
// ExtensionAction is first requested, and the entries are removed when the
// extension is unloaded. Not every extension has a page action or browser