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