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

Unified Diff: extensions/browser/extension_registry.h

Issue 131743021: app_shell: Extract extension runtime data from ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, RuntimeDataTest tweak, win warning Created 6 years, 11 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | extensions/browser/extension_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_registry.h
diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h
index d878e61e84db8ec44e56741cad14925dd997c038..89256e1583eb9f902eecec627febf5b588d9634f 100644
--- a/extensions/browser/extension_registry.h
+++ b/extensions/browser/extension_registry.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "extensions/common/extension_set.h"
@@ -18,6 +19,7 @@ class BrowserContext;
namespace extensions {
class Extension;
+class ExtensionRegistryObserver;
// ExtensionRegistry holds sets of the installed extensions for a given
// BrowserContext. An incognito browser context and its master browser context
@@ -55,6 +57,14 @@ class ExtensionRegistry : public BrowserContextKeyedService {
return blacklisted_extensions_;
}
+ // The usual observer interface.
+ void AddObserver(ExtensionRegistryObserver* observer);
+ void RemoveObserver(ExtensionRegistryObserver* observer);
+
+ // Invokes the observer method OnExtensionUnloaded(). The extension must not
+ // be enabled at the time of the call.
+ void TriggerOnUnloaded(const Extension* extension);
+
// Find an extension by ID using |include_mask| to pick the sets to search:
// * enabled_extensions() --> ExtensionRegistry::ENABLED
// * disabled_extensions() --> ExtensionRegistry::DISABLED
@@ -117,6 +127,8 @@ class ExtensionRegistry : public BrowserContextKeyedService {
// un-blacklisted.
ExtensionSet blacklisted_extensions_;
+ ObserverList<ExtensionRegistryObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry);
};
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | extensions/browser/extension_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698