| 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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class AlarmManager; | 28 class AlarmManager; |
| 29 class EventRouter; | 29 class EventRouter; |
| 30 class Extension; | 30 class Extension; |
| 31 class ExtensionPrefs; | 31 class ExtensionPrefs; |
| 32 class ExtensionSystemSharedFactory; | 32 class ExtensionSystemSharedFactory; |
| 33 class LazyBackgroundTaskQueue; | 33 class LazyBackgroundTaskQueue; |
| 34 class ManagementPolicy; | 34 class ManagementPolicy; |
| 35 class MessageService; | 35 class MessageService; |
| 36 class NavigationObserver; | 36 class NavigationObserver; |
| 37 class RulesRegistryService; | 37 class RulesRegistryService; |
| 38 class ShellWindowGeometryCache; |
| 38 class StateStore; | 39 class StateStore; |
| 39 class UserScriptMaster; | 40 class UserScriptMaster; |
| 40 | 41 |
| 41 // The ExtensionSystem manages the creation and destruction of services | 42 // The ExtensionSystem manages the creation and destruction of services |
| 42 // related to extensions. Most objects are shared between normal | 43 // related to extensions. Most objects are shared between normal |
| 43 // and incognito Profiles, except as called out in comments. | 44 // and incognito Profiles, except as called out in comments. |
| 44 // This interface supports using TestExtensionSystem for TestingProfiles | 45 // This interface supports using TestExtensionSystem for TestingProfiles |
| 45 // that don't want all of the extensions baggage in their tests. | 46 // that don't want all of the extensions baggage in their tests. |
| 46 class ExtensionSystem : public ProfileKeyedService { | 47 class ExtensionSystem : public ProfileKeyedService { |
| 47 public: | 48 public: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 78 | 79 |
| 79 // The ExtensionProcessManager is created at startup. | 80 // The ExtensionProcessManager is created at startup. |
| 80 virtual ExtensionProcessManager* process_manager() = 0; | 81 virtual ExtensionProcessManager* process_manager() = 0; |
| 81 | 82 |
| 82 // The AlarmManager is created at startup. | 83 // The AlarmManager is created at startup. |
| 83 virtual AlarmManager* alarm_manager() = 0; | 84 virtual AlarmManager* alarm_manager() = 0; |
| 84 | 85 |
| 85 // The StateStore is created at startup. | 86 // The StateStore is created at startup. |
| 86 virtual StateStore* state_store() = 0; | 87 virtual StateStore* state_store() = 0; |
| 87 | 88 |
| 89 // The ShellWindowGeometryCache is created at startup. |
| 90 virtual ShellWindowGeometryCache* shell_window_geometry_cache() = 0; |
| 91 |
| 88 // Returns the IO-thread-accessible extension data. | 92 // Returns the IO-thread-accessible extension data. |
| 89 virtual ExtensionInfoMap* info_map() = 0; | 93 virtual ExtensionInfoMap* info_map() = 0; |
| 90 | 94 |
| 91 // The LazyBackgroundTaskQueue is created at startup. | 95 // The LazyBackgroundTaskQueue is created at startup. |
| 92 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() = 0; | 96 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() = 0; |
| 93 | 97 |
| 94 // The MessageService is created at startup. | 98 // The MessageService is created at startup. |
| 95 virtual MessageService* message_service() = 0; | 99 virtual MessageService* message_service() = 0; |
| 96 | 100 |
| 97 // The EventRouter is created at startup. | 101 // The EventRouter is created at startup. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; | 148 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; |
| 145 virtual void InitForOTRProfile() OVERRIDE; | 149 virtual void InitForOTRProfile() OVERRIDE; |
| 146 | 150 |
| 147 virtual ExtensionService* extension_service() OVERRIDE; // shared | 151 virtual ExtensionService* extension_service() OVERRIDE; // shared |
| 148 virtual ManagementPolicy* management_policy() OVERRIDE; // shared | 152 virtual ManagementPolicy* management_policy() OVERRIDE; // shared |
| 149 virtual UserScriptMaster* user_script_master() OVERRIDE; // shared | 153 virtual UserScriptMaster* user_script_master() OVERRIDE; // shared |
| 150 virtual ExtensionDevToolsManager* devtools_manager() OVERRIDE; | 154 virtual ExtensionDevToolsManager* devtools_manager() OVERRIDE; |
| 151 virtual ExtensionProcessManager* process_manager() OVERRIDE; | 155 virtual ExtensionProcessManager* process_manager() OVERRIDE; |
| 152 virtual AlarmManager* alarm_manager() OVERRIDE; | 156 virtual AlarmManager* alarm_manager() OVERRIDE; |
| 153 virtual StateStore* state_store() OVERRIDE; | 157 virtual StateStore* state_store() OVERRIDE; |
| 158 virtual ShellWindowGeometryCache* shell_window_geometry_cache() OVERRIDE; |
| 154 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() | 159 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() |
| 155 OVERRIDE; // shared | 160 OVERRIDE; // shared |
| 156 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared | 161 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared |
| 157 virtual MessageService* message_service() OVERRIDE; // shared | 162 virtual MessageService* message_service() OVERRIDE; // shared |
| 158 virtual EventRouter* event_router() OVERRIDE; // shared | 163 virtual EventRouter* event_router() OVERRIDE; // shared |
| 159 virtual RulesRegistryService* rules_registry_service() | 164 virtual RulesRegistryService* rules_registry_service() |
| 160 OVERRIDE; // shared | 165 OVERRIDE; // shared |
| 161 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() | 166 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() |
| 162 OVERRIDE; | 167 OVERRIDE; |
| 163 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; | 168 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 184 // Initialization takes place in phases. | 189 // Initialization takes place in phases. |
| 185 virtual void InitPrefs(); | 190 virtual void InitPrefs(); |
| 186 // This must not be called until all the providers have been created. | 191 // This must not be called until all the providers have been created. |
| 187 void RegisterManagementPolicyProviders(); | 192 void RegisterManagementPolicyProviders(); |
| 188 void Init(bool extensions_enabled); | 193 void Init(bool extensions_enabled); |
| 189 | 194 |
| 190 // ProfileKeyedService implementation. | 195 // ProfileKeyedService implementation. |
| 191 virtual void Shutdown() OVERRIDE; | 196 virtual void Shutdown() OVERRIDE; |
| 192 | 197 |
| 193 StateStore* state_store(); | 198 StateStore* state_store(); |
| 199 ShellWindowGeometryCache* shell_window_geometry_cache(); |
| 194 ExtensionService* extension_service(); | 200 ExtensionService* extension_service(); |
| 195 ManagementPolicy* management_policy(); | 201 ManagementPolicy* management_policy(); |
| 196 UserScriptMaster* user_script_master(); | 202 UserScriptMaster* user_script_master(); |
| 197 ExtensionInfoMap* info_map(); | 203 ExtensionInfoMap* info_map(); |
| 198 LazyBackgroundTaskQueue* lazy_background_task_queue(); | 204 LazyBackgroundTaskQueue* lazy_background_task_queue(); |
| 199 MessageService* message_service(); | 205 MessageService* message_service(); |
| 200 EventRouter* event_router(); | 206 EventRouter* event_router(); |
| 201 | 207 |
| 202 private: | 208 private: |
| 203 Profile* profile_; | 209 Profile* profile_; |
| 204 | 210 |
| 205 // The services that are shared between normal and incognito profiles. | 211 // The services that are shared between normal and incognito profiles. |
| 206 | 212 |
| 207 scoped_ptr<StateStore> state_store_; | 213 scoped_ptr<StateStore> state_store_; |
| 214 scoped_ptr<ShellWindowGeometryCache> shell_window_geometry_cache_; |
| 208 scoped_ptr<ExtensionPrefs> extension_prefs_; | 215 scoped_ptr<ExtensionPrefs> extension_prefs_; |
| 209 // ExtensionService depends on the 2 above. | 216 // ExtensionService depends on the 2 above. |
| 210 scoped_ptr<ExtensionService> extension_service_; | 217 scoped_ptr<ExtensionService> extension_service_; |
| 211 scoped_ptr<ManagementPolicy> management_policy_; | 218 scoped_ptr<ManagementPolicy> management_policy_; |
| 212 scoped_refptr<UserScriptMaster> user_script_master_; | 219 scoped_refptr<UserScriptMaster> user_script_master_; |
| 213 // extension_info_map_ needs to outlive extension_process_manager_. | 220 // extension_info_map_ needs to outlive extension_process_manager_. |
| 214 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 221 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 215 // This is a dependency of MessageService and EventRouter. | 222 // This is a dependency of MessageService and EventRouter. |
| 216 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; | 223 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; |
| 217 scoped_ptr<MessageService> message_service_; | 224 scoped_ptr<MessageService> message_service_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 236 scoped_ptr<ApiResourceManager< | 243 scoped_ptr<ApiResourceManager< |
| 237 UsbDeviceResource> > usb_device_resource_manager_; | 244 UsbDeviceResource> > usb_device_resource_manager_; |
| 238 scoped_ptr<RulesRegistryService> rules_registry_service_; | 245 scoped_ptr<RulesRegistryService> rules_registry_service_; |
| 239 | 246 |
| 240 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 247 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
| 241 }; | 248 }; |
| 242 | 249 |
| 243 } // namespace extensions | 250 } // namespace extensions |
| 244 | 251 |
| 245 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 252 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
| OLD | NEW |