| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // startup sequence. | 100 // startup sequence. |
| 101 struct Schemes { | 101 struct Schemes { |
| 102 Schemes(); | 102 Schemes(); |
| 103 ~Schemes(); | 103 ~Schemes(); |
| 104 std::vector<std::string> standard_schemes; | 104 std::vector<std::string> standard_schemes; |
| 105 std::vector<std::string> referrer_schemes; | 105 std::vector<std::string> referrer_schemes; |
| 106 std::vector<std::string> savable_schemes; | 106 std::vector<std::string> savable_schemes; |
| 107 // Additional schemes that should be allowed to register service workers. | 107 // Additional schemes that should be allowed to register service workers. |
| 108 // Only secure and trustworthy schemes should be added. | 108 // Only secure and trustworthy schemes should be added. |
| 109 std::vector<std::string> service_worker_schemes; | 109 std::vector<std::string> service_worker_schemes; |
| 110 // For the following three, see the documentation in WebSecurityPolicy. | 110 // Registers a URL scheme to be treated as a local scheme (i.e., with the |
| 111 // same security rules as those applied to "file" URLs). This means that |
| 112 // normal pages cannot link to or access URLs of this scheme. |
| 111 std::vector<std::string> local_schemes; | 113 std::vector<std::string> local_schemes; |
| 114 // Registers a URL scheme to be treated as a noAccess scheme. This means |
| 115 // that pages loaded with this URL scheme always have an opaque origin. |
| 112 std::vector<std::string> no_access_schemes; | 116 std::vector<std::string> no_access_schemes; |
| 117 // Registers a non-HTTP URL scheme which can be sent CORS requests. |
| 113 std::vector<std::string> cors_enabled_schemes; | 118 std::vector<std::string> cors_enabled_schemes; |
| 119 // Registers a URL scheme whose resources can be loaded regardless of a |
| 120 // page's Content Security Policy. |
| 114 std::vector<std::string> csp_bypassing_schemes; | 121 std::vector<std::string> csp_bypassing_schemes; |
| 115 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. | 122 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. |
| 116 std::vector<std::string> secure_schemes; | 123 std::vector<std::string> secure_schemes; |
| 117 std::vector<GURL> secure_origins; | 124 std::vector<GURL> secure_origins; |
| 125 // Registers a URL scheme as strictly empty documents, allowing them to |
| 126 // commit synchronously. |
| 127 std::vector<std::string> empty_document_schemes; |
| 118 }; | 128 }; |
| 119 | 129 |
| 120 virtual void AddAdditionalSchemes(Schemes* schemes) {} | 130 virtual void AddAdditionalSchemes(Schemes* schemes) {} |
| 121 | 131 |
| 122 // Returns whether the given message should be sent in a swapped out renderer. | 132 // Returns whether the given message should be sent in a swapped out renderer. |
| 123 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); | 133 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); |
| 124 | 134 |
| 125 // Returns a string describing the embedder product name and version, | 135 // Returns a string describing the embedder product name and version, |
| 126 // of the form "productname/version", with no other slashes. | 136 // of the form "productname/version", with no other slashes. |
| 127 // Used as part of the user agent string. | 137 // Used as part of the user agent string. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 ContentGpuClient* gpu_; | 207 ContentGpuClient* gpu_; |
| 198 // The embedder API for participating in renderer logic. | 208 // The embedder API for participating in renderer logic. |
| 199 ContentRendererClient* renderer_; | 209 ContentRendererClient* renderer_; |
| 200 // The embedder API for participating in utility logic. | 210 // The embedder API for participating in utility logic. |
| 201 ContentUtilityClient* utility_; | 211 ContentUtilityClient* utility_; |
| 202 }; | 212 }; |
| 203 | 213 |
| 204 } // namespace content | 214 } // namespace content |
| 205 | 215 |
| 206 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 216 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |