Chromium Code Reviews| 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..f31e6127b96e817e2c2d1c5b78e719b56a7aee83 100644 |
| --- a/chrome/browser/extensions/declarative_user_script_master.h |
| +++ b/chrome/browser/extensions/declarative_user_script_master.h |
| @@ -6,26 +6,23 @@ |
| #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" |
| +#include "extensions/common/consumer_id.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(); |
|
Devlin
2015/01/21 23:25:20
Nothing inherits this, right? We can make it a no
Xi Han
2015/01/22 17:19:36
Done.
|
| // Adds script to shared memory region. This may not happen right away if a |
| // script load is in progress. |
| @@ -39,23 +36,15 @@ 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_; |
| + ExtensionUserScriptLoader loader_; |
| DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); |
| }; |