| 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..1b185314a0c1aaefb839808a27e3c76920fa0522 100644
|
| --- a/chrome/browser/extensions/declarative_user_script_master.h
|
| +++ b/chrome/browser/extensions/declarative_user_script_master.h
|
| @@ -7,25 +7,22 @@
|
|
|
| #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 "extensions/common/consumer.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 ConsumerID& id);
|
| + virtual ~DeclarativeUserScriptMaster();
|
|
|
| // Adds script to shared memory region. This may not happen right away if a
|
| // script load is in progress.
|
| @@ -39,24 +36,16 @@ class DeclarativeUserScriptMaster : public ExtensionRegistryObserver {
|
| // away if a script load is in progress.
|
| void ClearScripts();
|
|
|
| - const ExtensionId& extension_id() const { return extension_id_; }
|
| + const ConsumerID& consumer_id() const { return consumer_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 consumer that owns scripts that this component manages.
|
| + ConsumerID consumer_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_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster);
|
| };
|
|
|
|
|