Chromium Code Reviews| 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 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 // The ExtensionSystem manages the creation and destruction of services | 30 // The ExtensionSystem manages the creation and destruction of services |
| 31 // related to extensions. Most objects are shared between normal | 31 // related to extensions. Most objects are shared between normal |
| 32 // and incognito Profiles, except as called out in comments. | 32 // and incognito Profiles, except as called out in comments. |
| 33 // This interface supports using TestExtensionSystem for TestingProfiles | 33 // This interface supports using TestExtensionSystem for TestingProfiles |
| 34 // that don't want all of the extensions baggage in their tests. | 34 // that don't want all of the extensions baggage in their tests. |
| 35 class ExtensionSystem : public ProfileKeyedService { | 35 class ExtensionSystem : public ProfileKeyedService { |
| 36 public: | 36 public: |
| 37 ExtensionSystem(); | 37 ExtensionSystem(); |
| 38 virtual ~ExtensionSystem(); | 38 virtual ~ExtensionSystem(); |
| 39 | 39 |
| 40 // Returns the instance for the given profile, or NULL if none. This is | |
| 41 // a convenience wrapper around ExtensionSystemFactory::GetForProfile. | |
| 42 static ExtensionSystem* Get(Profile* profile); | |
|
Yoyo Zhou
2012/04/04 22:54:21
I think GetForProfile is still preferable.
Matt Perry
2012/04/04 22:56:44
Blech. Unnecessarily verbose IMO. No one is going
| |
| 43 | |
| 40 // ProfileKeyedService implementation. | 44 // ProfileKeyedService implementation. |
| 41 virtual void Shutdown() OVERRIDE {} | 45 virtual void Shutdown() OVERRIDE {} |
| 42 | 46 |
| 43 // Initializes extensions machinery. | 47 // Initializes extensions machinery. |
| 44 // Component extensions are always enabled, external and user extensions | 48 // Component extensions are always enabled, external and user extensions |
| 45 // are controlled by |extensions_enabled|. | 49 // are controlled by |extensions_enabled|. |
| 46 virtual void Init(bool extensions_enabled) = 0; | 50 virtual void Init(bool extensions_enabled) = 0; |
| 47 | 51 |
| 48 // The ExtensionService is created at startup. | 52 // The ExtensionService is created at startup. |
| 49 virtual ExtensionService* extension_service() = 0; | 53 virtual ExtensionService* extension_service() = 0; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 // The services that have their own instances in incognito. | 169 // The services that have their own instances in incognito. |
| 166 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; | 170 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; |
| 167 // |extension_process_manager_| must be destroyed before the Profile's | 171 // |extension_process_manager_| must be destroyed before the Profile's |
| 168 // |io_data_|. While |extension_process_manager_| still lives, we handle | 172 // |io_data_|. While |extension_process_manager_| still lives, we handle |
| 169 // incoming resource requests from extension processes and those require | 173 // incoming resource requests from extension processes and those require |
| 170 // access to the ResourceContext owned by |io_data_|. | 174 // access to the ResourceContext owned by |io_data_|. |
| 171 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 175 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
| 172 }; | 176 }; |
| 173 | 177 |
| 174 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ | 178 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ |
| OLD | NEW |