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" | |
22 #include "extensions/browser/notification_types.h" | 21 #include "extensions/browser/notification_types.h" |
23 #include "extensions/browser/quota_service.h" | 22 #include "extensions/browser/quota_service.h" |
24 #include "extensions/browser/runtime_data.h" | 23 #include "extensions/browser/runtime_data.h" |
25 #include "extensions/common/constants.h" | 24 #include "extensions/common/constants.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 { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 AppRuntimeEventRouter::DispatchOnLaunchedEvent( | 90 AppRuntimeEventRouter::DispatchOnLaunchedEvent( |
92 browser_context_, extension, extensions::SOURCE_UNTRACKED); | 91 browser_context_, extension, extensions::SOURCE_UNTRACKED); |
93 } | 92 } |
94 | 93 |
95 void ShellExtensionSystem::Shutdown() { | 94 void ShellExtensionSystem::Shutdown() { |
96 } | 95 } |
97 | 96 |
98 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { | 97 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { |
99 runtime_data_.reset( | 98 runtime_data_.reset( |
100 new RuntimeData(ExtensionRegistry::Get(browser_context_))); | 99 new RuntimeData(ExtensionRegistry::Get(browser_context_))); |
101 lazy_background_task_queue_.reset( | |
102 new LazyBackgroundTaskQueue(browser_context_)); | |
103 event_router_.reset( | 100 event_router_.reset( |
104 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); | 101 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); |
105 quota_service_.reset(new QuotaService); | 102 quota_service_.reset(new QuotaService); |
106 } | 103 } |
107 | 104 |
108 ExtensionService* ShellExtensionSystem::extension_service() { | 105 ExtensionService* ShellExtensionSystem::extension_service() { |
109 return nullptr; | 106 return nullptr; |
110 } | 107 } |
111 | 108 |
112 RuntimeData* ShellExtensionSystem::runtime_data() { | 109 RuntimeData* ShellExtensionSystem::runtime_data() { |
(...skipping 20 matching lines...) Expand all Loading... |
133 StateStore* ShellExtensionSystem::rules_store() { | 130 StateStore* ShellExtensionSystem::rules_store() { |
134 return nullptr; | 131 return nullptr; |
135 } | 132 } |
136 | 133 |
137 InfoMap* ShellExtensionSystem::info_map() { | 134 InfoMap* ShellExtensionSystem::info_map() { |
138 if (!info_map_.get()) | 135 if (!info_map_.get()) |
139 info_map_ = new InfoMap; | 136 info_map_ = new InfoMap; |
140 return info_map_.get(); | 137 return info_map_.get(); |
141 } | 138 } |
142 | 139 |
143 LazyBackgroundTaskQueue* ShellExtensionSystem::lazy_background_task_queue() { | |
144 return lazy_background_task_queue_.get(); | |
145 } | |
146 | |
147 EventRouter* ShellExtensionSystem::event_router() { | 140 EventRouter* ShellExtensionSystem::event_router() { |
148 return event_router_.get(); | 141 return event_router_.get(); |
149 } | 142 } |
150 | 143 |
151 InstallVerifier* ShellExtensionSystem::install_verifier() { | 144 InstallVerifier* ShellExtensionSystem::install_verifier() { |
152 return nullptr; | 145 return nullptr; |
153 } | 146 } |
154 | 147 |
155 QuotaService* ShellExtensionSystem::quota_service() { | 148 QuotaService* ShellExtensionSystem::quota_service() { |
156 return quota_service_.get(); | 149 return quota_service_.get(); |
(...skipping 23 matching lines...) Expand all Loading... |
180 ContentVerifier* ShellExtensionSystem::content_verifier() { | 173 ContentVerifier* ShellExtensionSystem::content_verifier() { |
181 return nullptr; | 174 return nullptr; |
182 } | 175 } |
183 | 176 |
184 scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( | 177 scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( |
185 const Extension* extension) { | 178 const Extension* extension) { |
186 return make_scoped_ptr(new ExtensionSet()); | 179 return make_scoped_ptr(new ExtensionSet()); |
187 } | 180 } |
188 | 181 |
189 } // namespace extensions | 182 } // namespace extensions |
OLD | NEW |