Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: content/public/common/content_client.h

Issue 2760463005: Fix handling of external protocols with PlzNavigate. (Closed)
Patch Set: without PlzNavigate Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
dcheng 2017/03/23 21:07:15 Nit: indent
jam 2017/03/23 21:43:21 Done.
115 // that pages loaded with this URL scheme cannot access pages loaded with
116 // any other URL scheme.
dcheng 2017/03/23 21:07:15 Nit: probably more accurate to say that pages with
jam 2017/03/23 21:43:21 Done.
112 std::vector<std::string> no_access_schemes; 117 std::vector<std::string> no_access_schemes;
118 // Registers a non-HTTP URL scheme which can be sent CORS requests.
113 std::vector<std::string> cors_enabled_schemes; 119 std::vector<std::string> cors_enabled_schemes;
120 // Registers a URL scheme whose resources can be loaded regardless of a
121 // page's Content Security Policy.
114 std::vector<std::string> csp_bypassing_schemes; 122 std::vector<std::string> csp_bypassing_schemes;
115 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. 123 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy.
116 std::vector<std::string> secure_schemes; 124 std::vector<std::string> secure_schemes;
117 std::vector<GURL> secure_origins; 125 std::vector<GURL> secure_origins;
126 // Registers a URL scheme as strictly empty documents, allowing them to
127 // commit synchronously.
128 std::vector<std::string> empty_document_schemes;
118 }; 129 };
119 130
120 virtual void AddAdditionalSchemes(Schemes* schemes) {} 131 virtual void AddAdditionalSchemes(Schemes* schemes) {}
121 132
122 // Returns whether the given message should be sent in a swapped out renderer. 133 // Returns whether the given message should be sent in a swapped out renderer.
123 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); 134 virtual bool CanSendWhileSwappedOut(const IPC::Message* message);
124 135
125 // Returns a string describing the embedder product name and version, 136 // Returns a string describing the embedder product name and version,
126 // of the form "productname/version", with no other slashes. 137 // of the form "productname/version", with no other slashes.
127 // Used as part of the user agent string. 138 // Used as part of the user agent string.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ContentGpuClient* gpu_; 208 ContentGpuClient* gpu_;
198 // The embedder API for participating in renderer logic. 209 // The embedder API for participating in renderer logic.
199 ContentRendererClient* renderer_; 210 ContentRendererClient* renderer_;
200 // The embedder API for participating in utility logic. 211 // The embedder API for participating in utility logic.
201 ContentUtilityClient* utility_; 212 ContentUtilityClient* utility_;
202 }; 213 };
203 214
204 } // namespace content 215 } // namespace content
205 216
206 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 217 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698