| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/shell/browser/shell_extension_system.h" | 5 #include "extensions/shell/browser/shell_extension_system.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
| 14 #include "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
| 15 #include "content/public/browser/notification_source.h" | 15 #include "content/public/browser/notification_source.h" |
| 16 #include "extensions/browser/api/app_runtime/app_runtime_api.h" | 16 #include "extensions/browser/api/app_runtime/app_runtime_api.h" |
| 17 #include "extensions/browser/event_router.h" | 17 #include "extensions/browser/event_router.h" |
| 18 #include "extensions/browser/extension_prefs.h" | 18 #include "extensions/browser/extension_prefs.h" |
| 19 #include "extensions/browser/extension_registry.h" | 19 #include "extensions/browser/extension_registry.h" |
| 20 #include "extensions/browser/info_map.h" | 20 #include "extensions/browser/info_map.h" |
| 21 #include "extensions/browser/lazy_background_task_queue.h" | 21 #include "extensions/browser/lazy_background_task_queue.h" |
| 22 #include "extensions/browser/notification_types.h" | 22 #include "extensions/browser/notification_types.h" |
| 23 #include "extensions/browser/process_manager.h" | |
| 24 #include "extensions/browser/quota_service.h" | 23 #include "extensions/browser/quota_service.h" |
| 25 #include "extensions/browser/runtime_data.h" | 24 #include "extensions/browser/runtime_data.h" |
| 26 #include "extensions/common/file_util.h" | 25 #include "extensions/common/file_util.h" |
| 27 | 26 |
| 28 using content::BrowserContext; | 27 using content::BrowserContext; |
| 29 using content::BrowserThread; | 28 using content::BrowserThread; |
| 30 | 29 |
| 31 namespace extensions { | 30 namespace extensions { |
| 32 | 31 |
| 33 ShellExtensionSystem::ShellExtensionSystem(BrowserContext* browser_context) | 32 ShellExtensionSystem::ShellExtensionSystem(BrowserContext* browser_context) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void ShellExtensionSystem::Shutdown() { | 87 void ShellExtensionSystem::Shutdown() { |
| 89 } | 88 } |
| 90 | 89 |
| 91 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { | 90 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { |
| 92 runtime_data_.reset( | 91 runtime_data_.reset( |
| 93 new RuntimeData(ExtensionRegistry::Get(browser_context_))); | 92 new RuntimeData(ExtensionRegistry::Get(browser_context_))); |
| 94 lazy_background_task_queue_.reset( | 93 lazy_background_task_queue_.reset( |
| 95 new LazyBackgroundTaskQueue(browser_context_)); | 94 new LazyBackgroundTaskQueue(browser_context_)); |
| 96 event_router_.reset( | 95 event_router_.reset( |
| 97 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); | 96 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); |
| 98 process_manager_.reset(ProcessManager::Create(browser_context_)); | |
| 99 quota_service_.reset(new QuotaService); | 97 quota_service_.reset(new QuotaService); |
| 100 } | 98 } |
| 101 | 99 |
| 102 ExtensionService* ShellExtensionSystem::extension_service() { | 100 ExtensionService* ShellExtensionSystem::extension_service() { |
| 103 return NULL; | 101 return NULL; |
| 104 } | 102 } |
| 105 | 103 |
| 106 RuntimeData* ShellExtensionSystem::runtime_data() { | 104 RuntimeData* ShellExtensionSystem::runtime_data() { |
| 107 return runtime_data_.get(); | 105 return runtime_data_.get(); |
| 108 } | 106 } |
| 109 | 107 |
| 110 ManagementPolicy* ShellExtensionSystem::management_policy() { | 108 ManagementPolicy* ShellExtensionSystem::management_policy() { |
| 111 return NULL; | 109 return NULL; |
| 112 } | 110 } |
| 113 | 111 |
| 114 SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() { | 112 SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() { |
| 115 return NULL; | 113 return NULL; |
| 116 } | 114 } |
| 117 | 115 |
| 118 ProcessManager* ShellExtensionSystem::process_manager() { | |
| 119 return process_manager_.get(); | |
| 120 } | |
| 121 | |
| 122 StateStore* ShellExtensionSystem::state_store() { | 116 StateStore* ShellExtensionSystem::state_store() { |
| 123 return NULL; | 117 return NULL; |
| 124 } | 118 } |
| 125 | 119 |
| 126 StateStore* ShellExtensionSystem::rules_store() { | 120 StateStore* ShellExtensionSystem::rules_store() { |
| 127 return NULL; | 121 return NULL; |
| 128 } | 122 } |
| 129 | 123 |
| 130 InfoMap* ShellExtensionSystem::info_map() { | 124 InfoMap* ShellExtensionSystem::info_map() { |
| 131 if (!info_map_.get()) | 125 if (!info_map_.get()) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 return make_scoped_ptr(new ExtensionSet()); | 185 return make_scoped_ptr(new ExtensionSet()); |
| 192 } | 186 } |
| 193 | 187 |
| 194 DeclarativeUserScriptMaster* | 188 DeclarativeUserScriptMaster* |
| 195 ShellExtensionSystem::GetDeclarativeUserScriptMasterByExtension( | 189 ShellExtensionSystem::GetDeclarativeUserScriptMasterByExtension( |
| 196 const ExtensionId& extension_id) { | 190 const ExtensionId& extension_id) { |
| 197 return NULL; | 191 return NULL; |
| 198 } | 192 } |
| 199 | 193 |
| 200 } // namespace extensions | 194 } // namespace extensions |
| OLD | NEW |