| 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 12 matching lines...) Expand all Loading... |
| 23 class Profile; | 23 class Profile; |
| 24 | 24 |
| 25 namespace extensions { | 25 namespace extensions { |
| 26 // Unfortunately, for the ApiResourceManager<> template classes, we don't seem | 26 // Unfortunately, for the ApiResourceManager<> template classes, we don't seem |
| 27 // 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. |
| 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 ExtensionWarningBadgeService; |
| 34 class ExtensionWarningService; |
| 33 class LazyBackgroundTaskQueue; | 35 class LazyBackgroundTaskQueue; |
| 34 class ManagementPolicy; | 36 class ManagementPolicy; |
| 35 class MessageService; | 37 class MessageService; |
| 36 class NavigationObserver; | 38 class NavigationObserver; |
| 37 class RulesRegistryService; | 39 class RulesRegistryService; |
| 38 class ShellWindowGeometryCache; | 40 class ShellWindowGeometryCache; |
| 39 class StateStore; | 41 class StateStore; |
| 40 class UserScriptMaster; | 42 class UserScriptMaster; |
| 41 | 43 |
| 42 // The ExtensionSystem manages the creation and destruction of services | 44 // The ExtensionSystem manages the creation and destruction of services |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 serial_connection_manager() = 0; | 111 serial_connection_manager() = 0; |
| 110 | 112 |
| 111 // The Socket ResourceManager is created at startup. | 113 // The Socket ResourceManager is created at startup. |
| 112 virtual ApiResourceManager<Socket>* | 114 virtual ApiResourceManager<Socket>* |
| 113 socket_manager() = 0; | 115 socket_manager() = 0; |
| 114 | 116 |
| 115 // The UsbDeviceResource ResourceManager is created at startup. | 117 // The UsbDeviceResource ResourceManager is created at startup. |
| 116 virtual ApiResourceManager<UsbDeviceResource>* | 118 virtual ApiResourceManager<UsbDeviceResource>* |
| 117 usb_device_resource_manager() = 0; | 119 usb_device_resource_manager() = 0; |
| 118 | 120 |
| 121 // The ExtensionWarningService is created at startup. |
| 122 virtual ExtensionWarningService* warning_service() = 0; |
| 123 |
| 119 // Called by the ExtensionService that lives in this system. Gives the | 124 // Called by the ExtensionService that lives in this system. Gives the |
| 120 // info map a chance to react to the load event before the EXTENSION_LOADED | 125 // info map a chance to react to the load event before the EXTENSION_LOADED |
| 121 // notification has fired. The purpose for handling this event first is to | 126 // notification has fired. The purpose for handling this event first is to |
| 122 // avoid race conditions by making sure URLRequestContexts learn about new | 127 // avoid race conditions by making sure URLRequestContexts learn about new |
| 123 // extensions before anything else needs them to know. | 128 // extensions before anything else needs them to know. |
| 124 virtual void RegisterExtensionWithRequestContexts( | 129 virtual void RegisterExtensionWithRequestContexts( |
| 125 const Extension* extension) {} | 130 const Extension* extension) {} |
| 126 | 131 |
| 127 // Called by the ExtensionService that lives in this system. Lets the | 132 // Called by the ExtensionService that lives in this system. Lets the |
| 128 // info map clean up its RequestContexts once all the listeners to the | 133 // info map clean up its RequestContexts once all the listeners to the |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared | 166 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared |
| 162 virtual MessageService* message_service() OVERRIDE; // shared | 167 virtual MessageService* message_service() OVERRIDE; // shared |
| 163 virtual EventRouter* event_router() OVERRIDE; // shared | 168 virtual EventRouter* event_router() OVERRIDE; // shared |
| 164 virtual RulesRegistryService* rules_registry_service() | 169 virtual RulesRegistryService* rules_registry_service() |
| 165 OVERRIDE; // shared | 170 OVERRIDE; // shared |
| 166 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() | 171 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() |
| 167 OVERRIDE; | 172 OVERRIDE; |
| 168 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; | 173 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; |
| 169 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager() | 174 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager() |
| 170 OVERRIDE; | 175 OVERRIDE; |
| 176 virtual ExtensionWarningService* warning_service() OVERRIDE; |
| 171 | 177 |
| 172 virtual void RegisterExtensionWithRequestContexts( | 178 virtual void RegisterExtensionWithRequestContexts( |
| 173 const Extension* extension) OVERRIDE; | 179 const Extension* extension) OVERRIDE; |
| 174 | 180 |
| 175 virtual void UnregisterExtensionWithRequestContexts( | 181 virtual void UnregisterExtensionWithRequestContexts( |
| 176 const std::string& extension_id, | 182 const std::string& extension_id, |
| 177 const extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 183 const extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
| 178 | 184 |
| 179 private: | 185 private: |
| 180 friend class ExtensionSystemSharedFactory; | 186 friend class ExtensionSystemSharedFactory; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // incoming resource requests from extension processes and those require | 244 // incoming resource requests from extension processes and those require |
| 239 // access to the ResourceContext owned by |io_data_|. | 245 // access to the ResourceContext owned by |io_data_|. |
| 240 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 246 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
| 241 scoped_ptr<AlarmManager> alarm_manager_; | 247 scoped_ptr<AlarmManager> alarm_manager_; |
| 242 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_; | 248 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_; |
| 243 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; | 249 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; |
| 244 scoped_ptr<ApiResourceManager< | 250 scoped_ptr<ApiResourceManager< |
| 245 UsbDeviceResource> > usb_device_resource_manager_; | 251 UsbDeviceResource> > usb_device_resource_manager_; |
| 246 scoped_ptr<RulesRegistryService> rules_registry_service_; | 252 scoped_ptr<RulesRegistryService> rules_registry_service_; |
| 247 | 253 |
| 254 scoped_ptr<ExtensionWarningService> extension_warning_service_; |
| 255 scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_; |
| 248 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 256 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
| 249 }; | 257 }; |
| 250 | 258 |
| 251 } // namespace extensions | 259 } // namespace extensions |
| 252 | 260 |
| 253 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 261 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
| OLD | NEW |