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 26 matching lines...) Expand all Loading... |
37 class ExtensionSet; | 37 class ExtensionSet; |
38 class InfoMap; | 38 class InfoMap; |
39 class InstallVerifier; | 39 class InstallVerifier; |
40 class LazyBackgroundTaskQueue; | 40 class LazyBackgroundTaskQueue; |
41 class ManagementPolicy; | 41 class ManagementPolicy; |
42 class OneShotEvent; | 42 class OneShotEvent; |
43 class QuotaService; | 43 class QuotaService; |
44 class RuntimeData; | 44 class RuntimeData; |
45 class SharedUserScriptMaster; | 45 class SharedUserScriptMaster; |
46 class StateStore; | 46 class StateStore; |
| 47 class WebViewContentScriptManager; |
47 | 48 |
48 // ExtensionSystem manages the lifetime of many of the services used by the | 49 // ExtensionSystem manages the lifetime of many of the services used by the |
49 // extensions and apps system, and it handles startup and shutdown as needed. | 50 // extensions and apps system, and it handles startup and shutdown as needed. |
50 // Eventually, we'd like to make more of these services into KeyedServices in | 51 // Eventually, we'd like to make more of these services into KeyedServices in |
51 // their own right. | 52 // their own right. |
52 class ExtensionSystem : public KeyedService { | 53 class ExtensionSystem : public KeyedService { |
53 public: | 54 public: |
54 ExtensionSystem(); | 55 ExtensionSystem(); |
55 ~ExtensionSystem() override; | 56 ~ExtensionSystem() override; |
56 | 57 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // The ErrorConsole is created at startup. | 99 // The ErrorConsole is created at startup. |
99 virtual ErrorConsole* error_console() = 0; | 100 virtual ErrorConsole* error_console() = 0; |
100 | 101 |
101 // The InstallVerifier is created at startup. | 102 // The InstallVerifier is created at startup. |
102 virtual InstallVerifier* install_verifier() = 0; | 103 virtual InstallVerifier* install_verifier() = 0; |
103 | 104 |
104 // Returns the QuotaService that limits calls to certain extension functions. | 105 // Returns the QuotaService that limits calls to certain extension functions. |
105 // Lives on the UI thread. Created at startup. | 106 // Lives on the UI thread. Created at startup. |
106 virtual QuotaService* quota_service() = 0; | 107 virtual QuotaService* quota_service() = 0; |
107 | 108 |
| 109 // The WebViewContentScriptManager is created at startup. |
| 110 virtual WebViewContentScriptManager* web_view_content_script_manager() = 0; |
| 111 |
108 // Called by the ExtensionService that lives in this system. Gives the | 112 // Called by the ExtensionService that lives in this system. Gives the |
109 // info map a chance to react to the load event before the EXTENSION_LOADED | 113 // info map a chance to react to the load event before the EXTENSION_LOADED |
110 // notification has fired. The purpose for handling this event first is to | 114 // notification has fired. The purpose for handling this event first is to |
111 // avoid race conditions by making sure URLRequestContexts learn about new | 115 // avoid race conditions by making sure URLRequestContexts learn about new |
112 // extensions before anything else needs them to know. | 116 // extensions before anything else needs them to know. |
113 virtual void RegisterExtensionWithRequestContexts( | 117 virtual void RegisterExtensionWithRequestContexts( |
114 const Extension* extension) {} | 118 const Extension* extension) {} |
115 | 119 |
116 // Called by the ExtensionService that lives in this system. Lets the | 120 // Called by the ExtensionService that lives in this system. Lets the |
117 // info map clean up its RequestContexts once all the listeners to the | 121 // info map clean up its RequestContexts once all the listeners to the |
(...skipping 11 matching lines...) Expand all Loading... |
129 // Get a set of extensions that depend on the given extension. | 133 // Get a set of extensions that depend on the given extension. |
130 // TODO(elijahtaylor): Move SharedModuleService out of chrome/browser | 134 // TODO(elijahtaylor): Move SharedModuleService out of chrome/browser |
131 // so it can be retrieved from ExtensionSystem directly. | 135 // so it can be retrieved from ExtensionSystem directly. |
132 virtual scoped_ptr<ExtensionSet> GetDependentExtensions( | 136 virtual scoped_ptr<ExtensionSet> GetDependentExtensions( |
133 const Extension* extension) = 0; | 137 const Extension* extension) = 0; |
134 }; | 138 }; |
135 | 139 |
136 } // namespace extensions | 140 } // namespace extensions |
137 | 141 |
138 #endif // EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ | 142 #endif // EXTENSIONS_BROWSER_EXTENSION_SYSTEM_H_ |
OLD | NEW |