OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/time/default_clock.h" |
12 #include "chrome/browser/extensions/api/api_resource_manager.h" | 13 #include "chrome/browser/extensions/api/api_resource_manager.h" |
13 #include "chrome/browser/extensions/api/serial/serial_connection.h" | 14 #include "chrome/browser/extensions/api/serial/serial_connection.h" |
14 #include "chrome/browser/extensions/api/socket/socket.h" | 15 #include "chrome/browser/extensions/api/socket/socket.h" |
15 #include "chrome/browser/extensions/api/usb/usb_device_resource.h" | 16 #include "chrome/browser/extensions/api/usb/usb_device_resource.h" |
16 #include "chrome/browser/profiles/profile_keyed_service.h" | 17 #include "chrome/browser/profiles/profile_keyed_service.h" |
17 #include "chrome/common/extensions/extension_constants.h" | 18 #include "chrome/common/extensions/extension_constants.h" |
18 | 19 |
19 class ExtensionInfoMap; | 20 class ExtensionInfoMap; |
20 class ExtensionProcessManager; | 21 class ExtensionProcessManager; |
21 class ExtensionService; | 22 class ExtensionService; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 205 |
205 // Initialization takes place in phases. | 206 // Initialization takes place in phases. |
206 virtual void InitPrefs(); | 207 virtual void InitPrefs(); |
207 // This must not be called until all the providers have been created. | 208 // This must not be called until all the providers have been created. |
208 void RegisterManagementPolicyProviders(); | 209 void RegisterManagementPolicyProviders(); |
209 void Init(bool extensions_enabled); | 210 void Init(bool extensions_enabled); |
210 | 211 |
211 // ProfileKeyedService implementation. | 212 // ProfileKeyedService implementation. |
212 virtual void Shutdown() OVERRIDE; | 213 virtual void Shutdown() OVERRIDE; |
213 | 214 |
| 215 base::Clock* clock(); |
214 StateStore* state_store(); | 216 StateStore* state_store(); |
215 StateStore* rules_store(); | 217 StateStore* rules_store(); |
216 ExtensionPrefs* extension_prefs(); | 218 ExtensionPrefs* extension_prefs(); |
217 ShellWindowGeometryCache* shell_window_geometry_cache(); | 219 ShellWindowGeometryCache* shell_window_geometry_cache(); |
218 ExtensionService* extension_service(); | 220 ExtensionService* extension_service(); |
219 ManagementPolicy* management_policy(); | 221 ManagementPolicy* management_policy(); |
220 UserScriptMaster* user_script_master(); | 222 UserScriptMaster* user_script_master(); |
221 Blacklist* blacklist(); | 223 Blacklist* blacklist(); |
222 ExtensionInfoMap* info_map(); | 224 ExtensionInfoMap* info_map(); |
223 LazyBackgroundTaskQueue* lazy_background_task_queue(); | 225 LazyBackgroundTaskQueue* lazy_background_task_queue(); |
224 MessageService* message_service(); | 226 MessageService* message_service(); |
225 EventRouter* event_router(); | 227 EventRouter* event_router(); |
226 ExtensionWarningService* warning_service(); | 228 ExtensionWarningService* warning_service(); |
227 | 229 |
228 private: | 230 private: |
229 Profile* profile_; | 231 Profile* profile_; |
230 | 232 |
231 // The services that are shared between normal and incognito profiles. | 233 // The services that are shared between normal and incognito profiles. |
232 | 234 |
| 235 base::DefaultClock clock_; |
233 scoped_ptr<StateStore> state_store_; | 236 scoped_ptr<StateStore> state_store_; |
234 scoped_ptr<StateStore> rules_store_; | 237 scoped_ptr<StateStore> rules_store_; |
235 scoped_ptr<ExtensionPrefs> extension_prefs_; | 238 scoped_ptr<ExtensionPrefs> extension_prefs_; |
236 // ShellWindowGeometryCache depends on ExtensionPrefs. | 239 // ShellWindowGeometryCache depends on ExtensionPrefs. |
237 scoped_ptr<ShellWindowGeometryCache> shell_window_geometry_cache_; | 240 scoped_ptr<ShellWindowGeometryCache> shell_window_geometry_cache_; |
238 // LazyBackgroundTaskQueue is a dependency of | 241 // LazyBackgroundTaskQueue is a dependency of |
239 // MessageService and EventRouter. | 242 // MessageService and EventRouter. |
240 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; | 243 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; |
241 scoped_ptr<EventRouter> event_router_; | 244 scoped_ptr<EventRouter> event_router_; |
242 scoped_ptr<MessageService> message_service_; | 245 scoped_ptr<MessageService> message_service_; |
(...skipping 28 matching lines...) Expand all Loading... |
271 scoped_ptr<ApiResourceManager< | 274 scoped_ptr<ApiResourceManager< |
272 UsbDeviceResource> > usb_device_resource_manager_; | 275 UsbDeviceResource> > usb_device_resource_manager_; |
273 scoped_ptr<RulesRegistryService> rules_registry_service_; | 276 scoped_ptr<RulesRegistryService> rules_registry_service_; |
274 | 277 |
275 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 278 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
276 }; | 279 }; |
277 | 280 |
278 } // namespace extensions | 281 } // namespace extensions |
279 | 282 |
280 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 283 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
OLD | NEW |