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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual void AddPepperPlugins( | 87 virtual void AddPepperPlugins( |
88 std::vector<content::PepperPluginInfo>* plugins) {} | 88 std::vector<content::PepperPluginInfo>* plugins) {} |
89 | 89 |
90 // Gives the embedder a chance to register the content decryption | 90 // Gives the embedder a chance to register the content decryption |
91 // modules it supports. | 91 // modules it supports. |
92 virtual void AddContentDecryptionModules( | 92 virtual void AddContentDecryptionModules( |
93 std::vector<content::CdmInfo>* cdms) {} | 93 std::vector<content::CdmInfo>* cdms) {} |
94 | 94 |
95 // Gives the embedder a chance to register its own schemes early in the | 95 // Gives the embedder a chance to register its own schemes early in the |
96 // startup sequence. | 96 // startup sequence. |
97 // For the secure schemes and origins that need to be considered trustworthy, | |
98 // see https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. | |
99 // |service_workers_schemes| are additional schemes that should be allowed to | |
100 // register service workers. Only secure and trustworthy schemes should be | |
101 // added. | |
102 struct Schemes { | 97 struct Schemes { |
103 Schemes(); | 98 Schemes(); |
104 ~Schemes(); | 99 ~Schemes(); |
105 std::vector<std::string> standard_schemes; | 100 std::vector<std::string> standard_schemes; |
106 std::vector<std::string> referrer_schemes; | 101 std::vector<std::string> referrer_schemes; |
107 std::vector<std::string> savable_schemes; | 102 std::vector<std::string> savable_schemes; |
| 103 // Additional schemes that should be allowed to register service workers. |
| 104 // Only secure and trustworthy schemes should be added. |
| 105 std::vector<std::string> service_worker_schemes; |
| 106 // For the following three, see the documentation in WebSecurityPolicy. |
| 107 std::vector<std::string> local_schemes; |
| 108 std::vector<std::string> no_access_schemes; |
| 109 std::vector<std::string> cors_enabled_schemes; |
| 110 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. |
108 std::vector<std::string> secure_schemes; | 111 std::vector<std::string> secure_schemes; |
109 std::vector<std::string> service_worker_schemes; | |
110 std::vector<GURL> secure_origins; | 112 std::vector<GURL> secure_origins; |
111 }; | 113 }; |
112 | 114 |
113 virtual void AddAdditionalSchemes(Schemes* schemes) {} | 115 virtual void AddAdditionalSchemes(Schemes* schemes) {} |
114 | 116 |
115 // Returns whether the given message should be sent in a swapped out renderer. | 117 // Returns whether the given message should be sent in a swapped out renderer. |
116 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); | 118 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); |
117 | 119 |
118 // Returns a string describing the embedder product name and version, | 120 // Returns a string describing the embedder product name and version, |
119 // of the form "productname/version", with no other slashes. | 121 // of the form "productname/version", with no other slashes. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ContentGpuClient* gpu_; | 192 ContentGpuClient* gpu_; |
191 // The embedder API for participating in renderer logic. | 193 // The embedder API for participating in renderer logic. |
192 ContentRendererClient* renderer_; | 194 ContentRendererClient* renderer_; |
193 // The embedder API for participating in utility logic. | 195 // The embedder API for participating in utility logic. |
194 ContentUtilityClient* utility_; | 196 ContentUtilityClient* utility_; |
195 }; | 197 }; |
196 | 198 |
197 } // namespace content | 199 } // namespace content |
198 | 200 |
199 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 201 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |