| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void ShellExtensionSystem::Shutdown() { | 93 void ShellExtensionSystem::Shutdown() { |
| 95 } | 94 } |
| 96 | 95 |
| 97 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { | 96 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { |
| 98 runtime_data_.reset( | 97 runtime_data_.reset( |
| 99 new RuntimeData(ExtensionRegistry::Get(browser_context_))); | 98 new RuntimeData(ExtensionRegistry::Get(browser_context_))); |
| 100 lazy_background_task_queue_.reset( | 99 lazy_background_task_queue_.reset( |
| 101 new LazyBackgroundTaskQueue(browser_context_)); | 100 new LazyBackgroundTaskQueue(browser_context_)); |
| 102 event_router_.reset( | 101 event_router_.reset( |
| 103 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); | 102 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); |
| 104 process_manager_.reset(ProcessManager::Create(browser_context_)); | |
| 105 quota_service_.reset(new QuotaService); | 103 quota_service_.reset(new QuotaService); |
| 106 } | 104 } |
| 107 | 105 |
| 108 ExtensionService* ShellExtensionSystem::extension_service() { | 106 ExtensionService* ShellExtensionSystem::extension_service() { |
| 109 return NULL; | 107 return NULL; |
| 110 } | 108 } |
| 111 | 109 |
| 112 RuntimeData* ShellExtensionSystem::runtime_data() { | 110 RuntimeData* ShellExtensionSystem::runtime_data() { |
| 113 return runtime_data_.get(); | 111 return runtime_data_.get(); |
| 114 } | 112 } |
| 115 | 113 |
| 116 ManagementPolicy* ShellExtensionSystem::management_policy() { | 114 ManagementPolicy* ShellExtensionSystem::management_policy() { |
| 117 return NULL; | 115 return NULL; |
| 118 } | 116 } |
| 119 | 117 |
| 120 SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() { | 118 SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() { |
| 121 return NULL; | 119 return NULL; |
| 122 } | 120 } |
| 123 | 121 |
| 124 ProcessManager* ShellExtensionSystem::process_manager() { | |
| 125 return process_manager_.get(); | |
| 126 } | |
| 127 | |
| 128 StateStore* ShellExtensionSystem::state_store() { | 122 StateStore* ShellExtensionSystem::state_store() { |
| 129 return NULL; | 123 return NULL; |
| 130 } | 124 } |
| 131 | 125 |
| 132 StateStore* ShellExtensionSystem::rules_store() { | 126 StateStore* ShellExtensionSystem::rules_store() { |
| 133 return NULL; | 127 return NULL; |
| 134 } | 128 } |
| 135 | 129 |
| 136 InfoMap* ShellExtensionSystem::info_map() { | 130 InfoMap* ShellExtensionSystem::info_map() { |
| 137 if (!info_map_.get()) | 131 if (!info_map_.get()) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 return make_scoped_ptr(new ExtensionSet()); | 191 return make_scoped_ptr(new ExtensionSet()); |
| 198 } | 192 } |
| 199 | 193 |
| 200 DeclarativeUserScriptMaster* | 194 DeclarativeUserScriptMaster* |
| 201 ShellExtensionSystem::GetDeclarativeUserScriptMasterByExtension( | 195 ShellExtensionSystem::GetDeclarativeUserScriptMasterByExtension( |
| 202 const ExtensionId& extension_id) { | 196 const ExtensionId& extension_id) { |
| 203 return NULL; | 197 return NULL; |
| 204 } | 198 } |
| 205 | 199 |
| 206 } // namespace extensions | 200 } // namespace extensions |
| OLD | NEW |