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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/profiles/profile_keyed_service.h" | 13 #include "chrome/browser/profiles/profile_keyed_service.h" |
14 #include "chrome/common/extensions/extension_constants.h" | 14 #include "chrome/common/extensions/extension_constants.h" |
15 | 15 |
16 class ExtensionDevToolsManager; | 16 class ExtensionDevToolsManager; |
17 class ExtensionEventRouter; | 17 class ExtensionEventRouter; |
18 class ExtensionInfoMap; | 18 class ExtensionInfoMap; |
19 class ExtensionMessageService; | 19 class ExtensionMessageService; |
20 class ExtensionNavigationObserver; | 20 class ExtensionNavigationObserver; |
21 class ExtensionPrefs; | |
22 class ExtensionProcessManager; | 21 class ExtensionProcessManager; |
23 class ExtensionService; | 22 class ExtensionService; |
24 class Profile; | 23 class Profile; |
25 class UserScriptMaster; | 24 class UserScriptMaster; |
26 | 25 |
27 namespace extensions { | 26 namespace extensions { |
28 class AlarmManager; | 27 class AlarmManager; |
29 class Extension; | 28 class Extension; |
| 29 class ExtensionPrefs; |
30 class LazyBackgroundTaskQueue; | 30 class LazyBackgroundTaskQueue; |
31 class ManagementPolicy; | 31 class ManagementPolicy; |
32 class RulesRegistryService; | 32 class RulesRegistryService; |
33 class StateStore; | 33 class StateStore; |
34 } | 34 } |
35 | 35 |
36 // The ExtensionSystem manages the creation and destruction of services | 36 // The ExtensionSystem manages the creation and destruction of services |
37 // related to extensions. Most objects are shared between normal | 37 // related to extensions. Most objects are shared between normal |
38 // and incognito Profiles, except as called out in comments. | 38 // and incognito Profiles, except as called out in comments. |
39 // This interface supports using TestExtensionSystem for TestingProfiles | 39 // This interface supports using TestExtensionSystem for TestingProfiles |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 ExtensionMessageService* message_service(); | 173 ExtensionMessageService* message_service(); |
174 ExtensionEventRouter* event_router(); | 174 ExtensionEventRouter* event_router(); |
175 extensions::RulesRegistryService* rules_registry_service(); | 175 extensions::RulesRegistryService* rules_registry_service(); |
176 | 176 |
177 private: | 177 private: |
178 Profile* profile_; | 178 Profile* profile_; |
179 | 179 |
180 // The services that are shared between normal and incognito profiles. | 180 // The services that are shared between normal and incognito profiles. |
181 | 181 |
182 scoped_ptr<extensions::StateStore> state_store_; | 182 scoped_ptr<extensions::StateStore> state_store_; |
183 scoped_ptr<ExtensionPrefs> extension_prefs_; | 183 scoped_ptr<extensions::ExtensionPrefs> extension_prefs_; |
184 // ExtensionService depends on the 2 above. | 184 // ExtensionService depends on the 2 above. |
185 scoped_ptr<ExtensionService> extension_service_; | 185 scoped_ptr<ExtensionService> extension_service_; |
186 scoped_ptr<extensions::ManagementPolicy> management_policy_; | 186 scoped_ptr<extensions::ManagementPolicy> management_policy_; |
187 scoped_refptr<UserScriptMaster> user_script_master_; | 187 scoped_refptr<UserScriptMaster> user_script_master_; |
188 // extension_info_map_ needs to outlive extension_process_manager_. | 188 // extension_info_map_ needs to outlive extension_process_manager_. |
189 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 189 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
190 // This is a dependency of ExtensionMessageService and ExtensionEventRouter. | 190 // This is a dependency of ExtensionMessageService and ExtensionEventRouter. |
191 scoped_ptr<extensions::LazyBackgroundTaskQueue> lazy_background_task_queue_; | 191 scoped_ptr<extensions::LazyBackgroundTaskQueue> lazy_background_task_queue_; |
192 scoped_ptr<ExtensionMessageService> extension_message_service_; | 192 scoped_ptr<ExtensionMessageService> extension_message_service_; |
193 scoped_ptr<ExtensionEventRouter> extension_event_router_; | 193 scoped_ptr<ExtensionEventRouter> extension_event_router_; |
(...skipping 11 matching lines...) Expand all Loading... |
205 // |io_data_|. While |extension_process_manager_| still lives, we handle | 205 // |io_data_|. While |extension_process_manager_| still lives, we handle |
206 // incoming resource requests from extension processes and those require | 206 // incoming resource requests from extension processes and those require |
207 // access to the ResourceContext owned by |io_data_|. | 207 // access to the ResourceContext owned by |io_data_|. |
208 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 208 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
209 scoped_ptr<extensions::AlarmManager> alarm_manager_; | 209 scoped_ptr<extensions::AlarmManager> alarm_manager_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 211 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
212 }; | 212 }; |
213 | 213 |
214 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 214 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
OLD | NEW |