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 CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // that need to be considered trustworthy. | 150 // that need to be considered trustworthy. |
151 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. | 151 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. |
152 virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, | 152 virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, |
153 std::set<GURL>* origins) {} | 153 std::set<GURL>* origins) {} |
154 | 154 |
155 // Gives the embedder a chance to register additional schemes that | 155 // Gives the embedder a chance to register additional schemes that |
156 // should be allowed to register service workers. Only secure and | 156 // should be allowed to register service workers. Only secure and |
157 // trustworthy schemes should be added. | 157 // trustworthy schemes should be added. |
158 virtual void AddServiceWorkerSchemes(std::set<std::string>* schemes) {} | 158 virtual void AddServiceWorkerSchemes(std::set<std::string>* schemes) {} |
159 | 159 |
| 160 // Returns whether or not V8 script extensions should be allowed for a |
| 161 // service worker. |
| 162 virtual bool AllowScriptExtensionForServiceWorker(const GURL& script_url); |
| 163 |
160 // Returns true if the embedder wishes to supplement the site isolation policy | 164 // Returns true if the embedder wishes to supplement the site isolation policy |
161 // used by the content layer. Returning true enables the infrastructure for | 165 // used by the content layer. Returning true enables the infrastructure for |
162 // out-of-process iframes, and causes the content layer to consult | 166 // out-of-process iframes, and causes the content layer to consult |
163 // ContentBrowserClient::DoesSiteRequireDedicatedProcess() when making process | 167 // ContentBrowserClient::DoesSiteRequireDedicatedProcess() when making process |
164 // model decisions. | 168 // model decisions. |
165 virtual bool IsSupplementarySiteIsolationModeEnabled(); | 169 virtual bool IsSupplementarySiteIsolationModeEnabled(); |
166 | 170 |
167 // Returns the public key to be used for origin trials, or an empty string if | 171 // Returns the public key to be used for origin trials, or an empty string if |
168 // origin trials are not enabled in this context. | 172 // origin trials are not enabled in this context. |
169 virtual base::StringPiece GetOriginTrialPublicKey(); | 173 virtual base::StringPiece GetOriginTrialPublicKey(); |
(...skipping 18 matching lines...) Expand all Loading... |
188 ContentGpuClient* gpu_; | 192 ContentGpuClient* gpu_; |
189 // The embedder API for participating in renderer logic. | 193 // The embedder API for participating in renderer logic. |
190 ContentRendererClient* renderer_; | 194 ContentRendererClient* renderer_; |
191 // The embedder API for participating in utility logic. | 195 // The embedder API for participating in utility logic. |
192 ContentUtilityClient* utility_; | 196 ContentUtilityClient* utility_; |
193 }; | 197 }; |
194 | 198 |
195 } // namespace content | 199 } // namespace content |
196 | 200 |
197 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 201 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |