OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ | 6 #define EXTENSIONS_BROWSER_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 class StateStore; | 48 class StateStore; |
49 class WarningService; | 49 class WarningService; |
50 | 50 |
51 // ExtensionSystem manages the lifetime of many of the services used by the | 51 // ExtensionSystem manages the lifetime of many of the services used by the |
52 // extensions and apps system, and it handles startup and shutdown as needed. | 52 // extensions and apps system, and it handles startup and shutdown as needed. |
53 // Eventually, we'd like to make more of these services into KeyedServices in | 53 // Eventually, we'd like to make more of these services into KeyedServices in |
54 // their own right. | 54 // their own right. |
55 class ExtensionSystem : public KeyedService { | 55 class ExtensionSystem : public KeyedService { |
56 public: | 56 public: |
57 ExtensionSystem(); | 57 ExtensionSystem(); |
58 virtual ~ExtensionSystem(); | 58 ~ExtensionSystem() override; |
59 | 59 |
60 // Returns the instance for the given browser context, or NULL if none. | 60 // Returns the instance for the given browser context, or NULL if none. |
61 static ExtensionSystem* Get(content::BrowserContext* context); | 61 static ExtensionSystem* Get(content::BrowserContext* context); |
62 | 62 |
63 // Initializes extensions machinery. | 63 // Initializes extensions machinery. |
64 // Component extensions are always enabled, external and user extensions are | 64 // Component extensions are always enabled, external and user extensions are |
65 // controlled by |extensions_enabled|. | 65 // controlled by |extensions_enabled|. |
66 virtual void InitForRegularProfile(bool extensions_enabled) = 0; | 66 virtual void InitForRegularProfile(bool extensions_enabled) = 0; |
67 | 67 |
68 // The ExtensionService is created at startup. | 68 // The ExtensionService is created at startup. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 // Get the user script master for declarative scripts, if any. | 144 // Get the user script master for declarative scripts, if any. |
145 virtual DeclarativeUserScriptMaster* | 145 virtual DeclarativeUserScriptMaster* |
146 GetDeclarativeUserScriptMasterByExtension( | 146 GetDeclarativeUserScriptMasterByExtension( |
147 const ExtensionId& extension_id) = 0; | 147 const ExtensionId& extension_id) = 0; |
148 }; | 148 }; |
149 | 149 |
150 } // namespace extensions | 150 } // namespace extensions |
151 | 151 |
152 #endif // EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ | 152 #endif // EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ |
OLD | NEW |