Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/extensions/extension_system.h

Issue 10824204: Move small c/b/extensions classes into extensions namespace no.2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/extensions/api/api_resource_manager.h" 12 #include "chrome/browser/extensions/api/api_resource_manager.h"
13 #include "chrome/browser/extensions/api/serial/serial_connection.h" 13 #include "chrome/browser/extensions/api/serial/serial_connection.h"
14 #include "chrome/browser/extensions/api/socket/socket.h" 14 #include "chrome/browser/extensions/api/socket/socket.h"
15 #include "chrome/browser/extensions/api/usb/usb_device_resource.h" 15 #include "chrome/browser/extensions/api/usb/usb_device_resource.h"
16 #include "chrome/browser/profiles/profile_keyed_service.h" 16 #include "chrome/browser/profiles/profile_keyed_service.h"
17 #include "chrome/common/extensions/extension_constants.h" 17 #include "chrome/common/extensions/extension_constants.h"
18 18
19 class ExtensionDevToolsManager; 19 class ExtensionDevToolsManager;
20 class ExtensionInfoMap; 20 class ExtensionInfoMap;
21 class ExtensionNavigationObserver;
22 class ExtensionProcessManager; 21 class ExtensionProcessManager;
23 class ExtensionService; 22 class ExtensionService;
24 class Profile; 23 class Profile;
25 24
26 namespace extensions { 25 namespace extensions {
27 // Unfortunately, for the ApiResourceManager<> template classes, we don't seem 26 // Unfortunately, for the ApiResourceManager<> template classes, we don't seem
28 // to be able to forward-declare because of compilation errors on Windows. 27 // to be able to forward-declare because of compilation errors on Windows.
29 class AlarmManager; 28 class AlarmManager;
30 class EventRouter; 29 class EventRouter;
31 class Extension; 30 class Extension;
32 class ExtensionPrefs; 31 class ExtensionPrefs;
33 class ExtensionSystemSharedFactory; 32 class ExtensionSystemSharedFactory;
34 class LazyBackgroundTaskQueue; 33 class LazyBackgroundTaskQueue;
35 class ManagementPolicy; 34 class ManagementPolicy;
36 class MessageService; 35 class MessageService;
36 class NavigationObserver;
37 class RulesRegistryService; 37 class RulesRegistryService;
38 class StateStore; 38 class StateStore;
39 class UserScriptMaster; 39 class UserScriptMaster;
40 40
41 // The ExtensionSystem manages the creation and destruction of services 41 // The ExtensionSystem manages the creation and destruction of services
42 // related to extensions. Most objects are shared between normal 42 // related to extensions. Most objects are shared between normal
43 // and incognito Profiles, except as called out in comments. 43 // and incognito Profiles, except as called out in comments.
44 // This interface supports using TestExtensionSystem for TestingProfiles 44 // This interface supports using TestExtensionSystem for TestingProfiles
45 // that don't want all of the extensions baggage in their tests. 45 // that don't want all of the extensions baggage in their tests.
46 class ExtensionSystem : public ProfileKeyedService { 46 class ExtensionSystem : public ProfileKeyedService {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // ExtensionService depends on the 2 above. 207 // ExtensionService depends on the 2 above.
208 scoped_ptr<ExtensionService> extension_service_; 208 scoped_ptr<ExtensionService> extension_service_;
209 scoped_ptr<ManagementPolicy> management_policy_; 209 scoped_ptr<ManagementPolicy> management_policy_;
210 scoped_refptr<UserScriptMaster> user_script_master_; 210 scoped_refptr<UserScriptMaster> user_script_master_;
211 // extension_info_map_ needs to outlive extension_process_manager_. 211 // extension_info_map_ needs to outlive extension_process_manager_.
212 scoped_refptr<ExtensionInfoMap> extension_info_map_; 212 scoped_refptr<ExtensionInfoMap> extension_info_map_;
213 // This is a dependency of MessageService and EventRouter. 213 // This is a dependency of MessageService and EventRouter.
214 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; 214 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_;
215 scoped_ptr<MessageService> message_service_; 215 scoped_ptr<MessageService> message_service_;
216 scoped_ptr<EventRouter> extension_event_router_; 216 scoped_ptr<EventRouter> extension_event_router_;
217 scoped_ptr<ExtensionNavigationObserver> extension_navigation_observer_; 217 scoped_ptr<NavigationObserver> navigation_observer_;
218 }; 218 };
219 219
220 Profile* profile_; 220 Profile* profile_;
221 221
222 Shared* shared_; 222 Shared* shared_;
223 223
224 // The services that have their own instances in incognito. 224 // The services that have their own instances in incognito.
225 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; 225 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_;
226 // |extension_process_manager_| must be destroyed before the Profile's 226 // |extension_process_manager_| must be destroyed before the Profile's
227 // |io_data_|. While |extension_process_manager_| still lives, we handle 227 // |io_data_|. While |extension_process_manager_| still lives, we handle
228 // incoming resource requests from extension processes and those require 228 // incoming resource requests from extension processes and those require
229 // access to the ResourceContext owned by |io_data_|. 229 // access to the ResourceContext owned by |io_data_|.
230 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 230 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
231 scoped_ptr<AlarmManager> alarm_manager_; 231 scoped_ptr<AlarmManager> alarm_manager_;
232 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_; 232 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_;
233 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; 233 scoped_ptr<ApiResourceManager<Socket> > socket_manager_;
234 scoped_ptr<ApiResourceManager< 234 scoped_ptr<ApiResourceManager<
235 UsbDeviceResource> > usb_device_resource_manager_; 235 UsbDeviceResource> > usb_device_resource_manager_;
236 scoped_ptr<RulesRegistryService> rules_registry_service_; 236 scoped_ptr<RulesRegistryService> rules_registry_service_;
237 237
238 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 238 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
239 }; 239 };
240 240
241 } // namespace extensions 241 } // namespace extensions
242 242
243 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 243 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698