summaryrefslogtreecommitdiffstats
path: root/extensions/shell
diff options
context:
space:
mode:
authorhanxi <hanxi@chromium.org>2014-12-12 13:53:46 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-12 21:54:00 +0000
commit6d9b43a5c431b04947bdc135b179166e55199efa (patch)
tree67c07184ab049c6b3a8e4d0b2bd98cb17caf5118 /extensions/shell
parentc489fa833c62edf608a6ecbf553036fe9d7a3292 (diff)
downloadchromium_src-6d9b43a5c431b04947bdc135b179166e55199efa.zip
chromium_src-6d9b43a5c431b04947bdc135b179166e55199efa.tar.gz
chromium_src-6d9b43a5c431b04947bdc135b179166e55199efa.tar.bz2
This CL introduce DeclarativeUserScriptManager to manager a set of DeclarativeUserScriptMaster objects which were stored in the ExtensionSystemImpl.
With this refactor, it allows the DeclarativeUserScriptManager to take care of the creations of DeclarativeUserScriptMaster objects: 1) It enable the DeclarativeUserScriptManager accept all kinds of input keys and convert them as a uniform format; 2) The manager will assign a unique ID to the consumer who requests a DeclarativeUserScriptMaster object.The consumer can use this ID to do script injection. (The above two steps will be implemented in another CLs) This refactor is a part of issue "support DeclarativeContent script injection on <webview>", please refer to a design doc(https://goto.google.com/introduceidforscriptinjection). BUG=437566 Review URL: https://codereview.chromium.org/796453003 Cr-Commit-Position: refs/heads/master@{#308171}
Diffstat (limited to 'extensions/shell')
-rw-r--r--extensions/shell/browser/shell_extension_system.cc27
-rw-r--r--extensions/shell/browser/shell_extension_system.h5
2 files changed, 15 insertions, 17 deletions
diff --git a/extensions/shell/browser/shell_extension_system.cc b/extensions/shell/browser/shell_extension_system.cc
index ef7bc57..5b0cd525d 100644
--- a/extensions/shell/browser/shell_extension_system.cc
+++ b/extensions/shell/browser/shell_extension_system.cc
@@ -106,7 +106,7 @@ void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
}
ExtensionService* ShellExtensionSystem::extension_service() {
- return NULL;
+ return nullptr;
}
RuntimeData* ShellExtensionSystem::runtime_data() {
@@ -114,19 +114,24 @@ RuntimeData* ShellExtensionSystem::runtime_data() {
}
ManagementPolicy* ShellExtensionSystem::management_policy() {
- return NULL;
+ return nullptr;
}
SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() {
- return NULL;
+ return nullptr;
+}
+
+DeclarativeUserScriptManager*
+ShellExtensionSystem::declarative_user_script_manager() {
+ return nullptr;
}
StateStore* ShellExtensionSystem::state_store() {
- return NULL;
+ return nullptr;
}
StateStore* ShellExtensionSystem::rules_store() {
- return NULL;
+ return nullptr;
}
InfoMap* ShellExtensionSystem::info_map() {
@@ -144,11 +149,11 @@ EventRouter* ShellExtensionSystem::event_router() {
}
ErrorConsole* ShellExtensionSystem::error_console() {
- return NULL;
+ return nullptr;
}
InstallVerifier* ShellExtensionSystem::install_verifier() {
- return NULL;
+ return nullptr;
}
QuotaService* ShellExtensionSystem::quota_service() {
@@ -177,7 +182,7 @@ const OneShotEvent& ShellExtensionSystem::ready() const {
}
ContentVerifier* ShellExtensionSystem::content_verifier() {
- return NULL;
+ return nullptr;
}
scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions(
@@ -185,10 +190,4 @@ scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions(
return make_scoped_ptr(new ExtensionSet());
}
-DeclarativeUserScriptMaster*
-ShellExtensionSystem::GetDeclarativeUserScriptMasterByExtension(
- const ExtensionId& extension_id) {
- return NULL;
-}
-
} // namespace extensions
diff --git a/extensions/shell/browser/shell_extension_system.h b/extensions/shell/browser/shell_extension_system.h
index 7729d35..80c2bc1 100644
--- a/extensions/shell/browser/shell_extension_system.h
+++ b/extensions/shell/browser/shell_extension_system.h
@@ -23,7 +23,7 @@ class BrowserContext;
namespace extensions {
-class DeclarativeUserScriptMaster;
+class DeclarativeUserScriptManager;
class EventRouter;
class InfoMap;
class LazyBackgroundTaskQueue;
@@ -57,6 +57,7 @@ class ShellExtensionSystem : public ExtensionSystem {
RuntimeData* runtime_data() override;
ManagementPolicy* management_policy() override;
SharedUserScriptMaster* shared_user_script_master() override;
+ DeclarativeUserScriptManager* declarative_user_script_manager() override;
StateStore* state_store() override;
StateStore* rules_store() override;
InfoMap* info_map() override;
@@ -74,8 +75,6 @@ class ShellExtensionSystem : public ExtensionSystem {
ContentVerifier* content_verifier() override;
scoped_ptr<ExtensionSet> GetDependentExtensions(
const Extension* extension) override;
- DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByExtension(
- const ExtensionId& extension_id) override;
private:
content::BrowserContext* browser_context_; // Not owned.