Index: chrome/browser/extensions/declarative_user_script_master.h |
diff --git a/chrome/browser/extensions/declarative_user_script_master.h b/chrome/browser/extensions/declarative_user_script_master.h |
index f41545df0bac4a5cfc8cf6c89def08dd7fa02b48..e9af244cbe43e0ea46607b438231ddaadc974f53 100644 |
--- a/chrome/browser/extensions/declarative_user_script_master.h |
+++ b/chrome/browser/extensions/declarative_user_script_master.h |
@@ -6,26 +6,22 @@ |
#define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
#include "base/scoped_observer.h" |
-#include "chrome/browser/extensions/user_script_loader.h" |
-#include "extensions/browser/extension_registry_observer.h" |
-#include "extensions/common/extension.h" |
+#include "chrome/browser/extensions/extension_user_script_loader.h" |
class Profile; |
namespace extensions { |
-class ExtensionRegistry; |
class UserScript; |
// Manages declarative user scripts for a single extension. Owns a |
// UserScriptLoader to which file loading and shared memory management |
// operations are delegated, and provides an interface for adding, removing, |
// and clearing scripts. |
-class DeclarativeUserScriptMaster : public ExtensionRegistryObserver { |
+class DeclarativeUserScriptMaster { |
public: |
- DeclarativeUserScriptMaster(Profile* profile, |
- const ExtensionId& extension_id); |
- ~DeclarativeUserScriptMaster() override; |
+ DeclarativeUserScriptMaster(Profile* profile, const HostID& host_id); |
+ ~DeclarativeUserScriptMaster(); |
// Adds script to shared memory region. This may not happen right away if a |
// script load is in progress. |
@@ -39,23 +35,15 @@ class DeclarativeUserScriptMaster : public ExtensionRegistryObserver { |
// away if a script load is in progress. |
void ClearScripts(); |
- const ExtensionId& extension_id() const { return extension_id_; } |
+ const HostID& host_id() const { return host_id_; } |
private: |
- // ExtensionRegistryObserver implementation. |
- void OnExtensionUnloaded(content::BrowserContext* browser_context, |
- const Extension* extension, |
- UnloadedExtensionInfo::Reason reason) override; |
- |
- // ID of extension that owns scripts that this component manages. |
- ExtensionId extension_id_; |
+ // ID of host that owns scripts that this component manages. |
+ HostID host_id_; |
// Script loader that handles loading contents of scripts into shared memory |
// and notifying renderers of script updates. |
- UserScriptLoader loader_; |
- |
- ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
- extension_registry_observer_; |
+ ExtensionUserScriptLoader loader_; |
DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); |
}; |