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

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

Issue 22944002: Implementation of the "Redirect URLs to Packaged Apps" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fully reverted extension_service.cc to original form Created 7 years, 3 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 | Annotate | Revision Log
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"
(...skipping 19 matching lines...) Expand all
30 class EventRouter; 30 class EventRouter;
31 class Extension; 31 class Extension;
32 class ExtensionPrefs; 32 class ExtensionPrefs;
33 class ExtensionSystemSharedFactory; 33 class ExtensionSystemSharedFactory;
34 class ExtensionWarningBadgeService; 34 class ExtensionWarningBadgeService;
35 class ExtensionWarningService; 35 class ExtensionWarningService;
36 class LazyBackgroundTaskQueue; 36 class LazyBackgroundTaskQueue;
37 class ManagementPolicy; 37 class ManagementPolicy;
38 class MessageService; 38 class MessageService;
39 class NavigationObserver; 39 class NavigationObserver;
40 class PlatformAppRedirector;
40 class RulesRegistryService; 41 class RulesRegistryService;
41 class ShellWindowGeometryCache; 42 class ShellWindowGeometryCache;
42 class StandardManagementPolicyProvider; 43 class StandardManagementPolicyProvider;
43 class StateStore; 44 class StateStore;
44 class UserScriptMaster; 45 class UserScriptMaster;
45 46
46 // The ExtensionSystem manages the creation and destruction of services 47 // The ExtensionSystem manages the creation and destruction of services
47 // related to extensions. Most objects are shared between normal 48 // related to extensions. Most objects are shared between normal
48 // and incognito Profiles, except as called out in comments. 49 // and incognito Profiles, except as called out in comments.
49 // This interface supports using TestExtensionSystem for TestingProfiles 50 // This interface supports using TestExtensionSystem for TestingProfiles
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // The UsbDeviceResource ResourceManager is created at startup. 123 // The UsbDeviceResource ResourceManager is created at startup.
123 virtual ApiResourceManager<UsbDeviceResource>* 124 virtual ApiResourceManager<UsbDeviceResource>*
124 usb_device_resource_manager() = 0; 125 usb_device_resource_manager() = 0;
125 126
126 // The ExtensionWarningService is created at startup. 127 // The ExtensionWarningService is created at startup.
127 virtual ExtensionWarningService* warning_service() = 0; 128 virtual ExtensionWarningService* warning_service() = 0;
128 129
129 // The blacklist is created at startup. 130 // The blacklist is created at startup.
130 virtual Blacklist* blacklist() = 0; 131 virtual Blacklist* blacklist() = 0;
131 132
133 // The PlatformAppRedirector is created at startup.
134 virtual PlatformAppRedirector* platform_app_redirector() = 0;
135
132 // Called by the ExtensionService that lives in this system. Gives the 136 // Called by the ExtensionService that lives in this system. Gives the
133 // info map a chance to react to the load event before the EXTENSION_LOADED 137 // info map a chance to react to the load event before the EXTENSION_LOADED
134 // notification has fired. The purpose for handling this event first is to 138 // notification has fired. The purpose for handling this event first is to
135 // avoid race conditions by making sure URLRequestContexts learn about new 139 // avoid race conditions by making sure URLRequestContexts learn about new
136 // extensions before anything else needs them to know. 140 // extensions before anything else needs them to know.
137 virtual void RegisterExtensionWithRequestContexts( 141 virtual void RegisterExtensionWithRequestContexts(
138 const Extension* extension) {} 142 const Extension* extension) {}
139 143
140 // Called by the ExtensionService that lives in this system. Lets the 144 // Called by the ExtensionService that lives in this system. Lets the
141 // info map clean up its RequestContexts once all the listeners to the 145 // info map clean up its RequestContexts once all the listeners to the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 virtual EventRouter* event_router() OVERRIDE; // shared 182 virtual EventRouter* event_router() OVERRIDE; // shared
179 virtual RulesRegistryService* rules_registry_service() 183 virtual RulesRegistryService* rules_registry_service()
180 OVERRIDE; // shared 184 OVERRIDE; // shared
181 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() 185 virtual ApiResourceManager<SerialConnection>* serial_connection_manager()
182 OVERRIDE; 186 OVERRIDE;
183 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; 187 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE;
184 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager() 188 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager()
185 OVERRIDE; 189 OVERRIDE;
186 virtual ExtensionWarningService* warning_service() OVERRIDE; 190 virtual ExtensionWarningService* warning_service() OVERRIDE;
187 virtual Blacklist* blacklist() OVERRIDE; // shared 191 virtual Blacklist* blacklist() OVERRIDE; // shared
192 virtual PlatformAppRedirector* platform_app_redirector() OVERRIDE;
not at google - send to devlin 2013/08/29 17:35:56 // shared I'm pretty sure this doesn't need to be
sergeygs 2013/08/30 00:39:44 Done.
188 193
189 virtual void RegisterExtensionWithRequestContexts( 194 virtual void RegisterExtensionWithRequestContexts(
190 const Extension* extension) OVERRIDE; 195 const Extension* extension) OVERRIDE;
191 196
192 virtual void UnregisterExtensionWithRequestContexts( 197 virtual void UnregisterExtensionWithRequestContexts(
193 const std::string& extension_id, 198 const std::string& extension_id,
194 const extension_misc::UnloadedExtensionReason reason) OVERRIDE; 199 const extension_misc::UnloadedExtensionReason reason) OVERRIDE;
195 200
196 private: 201 private:
197 friend class ExtensionSystemSharedFactory; 202 friend class ExtensionSystemSharedFactory;
(...skipping 21 matching lines...) Expand all
219 ShellWindowGeometryCache* shell_window_geometry_cache(); 224 ShellWindowGeometryCache* shell_window_geometry_cache();
220 ExtensionService* extension_service(); 225 ExtensionService* extension_service();
221 ManagementPolicy* management_policy(); 226 ManagementPolicy* management_policy();
222 UserScriptMaster* user_script_master(); 227 UserScriptMaster* user_script_master();
223 Blacklist* blacklist(); 228 Blacklist* blacklist();
224 ExtensionInfoMap* info_map(); 229 ExtensionInfoMap* info_map();
225 LazyBackgroundTaskQueue* lazy_background_task_queue(); 230 LazyBackgroundTaskQueue* lazy_background_task_queue();
226 MessageService* message_service(); 231 MessageService* message_service();
227 EventRouter* event_router(); 232 EventRouter* event_router();
228 ExtensionWarningService* warning_service(); 233 ExtensionWarningService* warning_service();
234 PlatformAppRedirector* platform_app_redirector();
229 235
230 private: 236 private:
231 Profile* profile_; 237 Profile* profile_;
232 238
233 // The services that are shared between normal and incognito profiles. 239 // The services that are shared between normal and incognito profiles.
234 240
235 base::DefaultClock clock_; 241 base::DefaultClock clock_;
236 scoped_ptr<StateStore> state_store_; 242 scoped_ptr<StateStore> state_store_;
237 scoped_ptr<StateStore> rules_store_; 243 scoped_ptr<StateStore> rules_store_;
238 scoped_ptr<ExtensionPrefs> extension_prefs_; 244 scoped_ptr<ExtensionPrefs> extension_prefs_;
(...skipping 11 matching lines...) Expand all
250 // StandardManagementPolicyProvider depends on ExtensionPrefs and Blacklist. 256 // StandardManagementPolicyProvider depends on ExtensionPrefs and Blacklist.
251 scoped_ptr<StandardManagementPolicyProvider> 257 scoped_ptr<StandardManagementPolicyProvider>
252 standard_management_policy_provider_; 258 standard_management_policy_provider_;
253 // ExtensionService depends on ExtensionPrefs, StateStore, and Blacklist. 259 // ExtensionService depends on ExtensionPrefs, StateStore, and Blacklist.
254 scoped_ptr<ExtensionService> extension_service_; 260 scoped_ptr<ExtensionService> extension_service_;
255 scoped_ptr<ManagementPolicy> management_policy_; 261 scoped_ptr<ManagementPolicy> management_policy_;
256 // extension_info_map_ needs to outlive extension_process_manager_. 262 // extension_info_map_ needs to outlive extension_process_manager_.
257 scoped_refptr<ExtensionInfoMap> extension_info_map_; 263 scoped_refptr<ExtensionInfoMap> extension_info_map_;
258 scoped_ptr<ExtensionWarningService> extension_warning_service_; 264 scoped_ptr<ExtensionWarningService> extension_warning_service_;
259 scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_; 265 scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_;
266 scoped_ptr<PlatformAppRedirector> platform_app_redirector_;
260 }; 267 };
261 268
262 Profile* profile_; 269 Profile* profile_;
263 270
264 Shared* shared_; 271 Shared* shared_;
265 272
266 // |extension_process_manager_| must be destroyed before the Profile's 273 // |extension_process_manager_| must be destroyed before the Profile's
267 // |io_data_|. While |extension_process_manager_| still lives, we handle 274 // |io_data_|. While |extension_process_manager_| still lives, we handle
268 // incoming resource requests from extension processes and those require 275 // incoming resource requests from extension processes and those require
269 // access to the ResourceContext owned by |io_data_|. 276 // access to the ResourceContext owned by |io_data_|.
270 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 277 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
271 scoped_ptr<AlarmManager> alarm_manager_; 278 scoped_ptr<AlarmManager> alarm_manager_;
272 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_; 279 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_;
273 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; 280 scoped_ptr<ApiResourceManager<Socket> > socket_manager_;
274 scoped_ptr<ApiResourceManager< 281 scoped_ptr<ApiResourceManager<
275 UsbDeviceResource> > usb_device_resource_manager_; 282 UsbDeviceResource> > usb_device_resource_manager_;
276 scoped_ptr<RulesRegistryService> rules_registry_service_; 283 scoped_ptr<RulesRegistryService> rules_registry_service_;
277 284
278 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 285 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
279 }; 286 };
280 287
281 } // namespace extensions 288 } // namespace extensions
282 289
283 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 290 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698