| Index: content/public/common/content_client.h
|
| diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h
|
| index af05bb3e3e9305d64da961357a64a51757430661..1974ba031a4c2a35dc29329790423752c77854fb 100644
|
| --- a/content/public/common/content_client.h
|
| +++ b/content/public/common/content_client.h
|
| @@ -14,10 +14,9 @@
|
| #include "build/build_config.h"
|
| #include "content/common/content_export.h"
|
| #include "ui/base/layout.h"
|
| +#include "url/gurl.h"
|
| #include "url/url_util.h"
|
|
|
| -class GURL;
|
| -
|
| namespace base {
|
| class RefCountedMemory;
|
| }
|
| @@ -93,12 +92,25 @@ class CONTENT_EXPORT ContentClient {
|
| virtual void AddContentDecryptionModules(
|
| std::vector<content::CdmInfo>* cdms) {}
|
|
|
| - // Gives the embedder a chance to register its own standard, referrer and
|
| - // saveable url schemes early on in the startup sequence.
|
| - virtual void AddAdditionalSchemes(
|
| - std::vector<url::SchemeWithType>* standard_schemes,
|
| - std::vector<url::SchemeWithType>* referrer_schemes,
|
| - std::vector<std::string>* savable_schemes) {}
|
| + // Gives the embedder a chance to register its own schemes early in the
|
| + // startup sequence.
|
| + // For the secure schemes and origins that need to be considered trustworthy,
|
| + // see https://www.w3.org/TR/powerful-features/#is-origin-trustworthy.
|
| + // |service_workers_schemes| are additional schemes that should be allowed to
|
| + // register service workers. Only secure and trustworthy schemes should be
|
| + // added.
|
| + struct Schemes {
|
| + Schemes();
|
| + ~Schemes();
|
| + std::vector<std::string> standard_schemes;
|
| + std::vector<std::string> referrer_schemes;
|
| + std::vector<std::string> savable_schemes;
|
| + std::vector<std::string> secure_schemes;
|
| + std::vector<std::string> service_worker_schemes;
|
| + std::vector<GURL> secure_origins;
|
| + };
|
| +
|
| + virtual void AddAdditionalSchemes(Schemes* schemes) {}
|
|
|
| // Returns whether the given message should be sent in a swapped out renderer.
|
| virtual bool CanSendWhileSwappedOut(const IPC::Message* message);
|
| @@ -143,17 +155,6 @@ class CONTENT_EXPORT ContentClient {
|
| int* sandbox_profile_resource_id) const;
|
| #endif
|
|
|
| - // Gives the embedder a chance to register additional schemes and origins
|
| - // that need to be considered trustworthy.
|
| - // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy.
|
| - virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes,
|
| - std::set<GURL>* origins) {}
|
| -
|
| - // Gives the embedder a chance to register additional schemes that
|
| - // should be allowed to register service workers. Only secure and
|
| - // trustworthy schemes should be added.
|
| - virtual void AddServiceWorkerSchemes(std::set<std::string>* schemes) {}
|
| -
|
| // Returns whether or not V8 script extensions should be allowed for a
|
| // service worker.
|
| virtual bool AllowScriptExtensionForServiceWorker(const GURL& script_url);
|
|
|