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

Side by Side Diff: third_party/WebKit/public/web/WebFrameClient.h

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Indicates that another page has accessed the DOM of the initial empty 173 // Indicates that another page has accessed the DOM of the initial empty
174 // document of a main frame. After this, it is no longer safe to show a 174 // document of a main frame. After this, it is no longer safe to show a
175 // pending navigation's URL, because a URL spoof is possible. 175 // pending navigation's URL, because a URL spoof is possible.
176 virtual void DidAccessInitialDocument() {} 176 virtual void DidAccessInitialDocument() {}
177 177
178 // Request the creation of a new child frame. Embedders may return nullptr 178 // Request the creation of a new child frame. Embedders may return nullptr
179 // to prevent the new child frame from being attached. Otherwise, embedders 179 // to prevent the new child frame from being attached. Otherwise, embedders
180 // should create a new WebLocalFrame, insert it into the frame tree, and 180 // should create a new WebLocalFrame, insert it into the frame tree, and
181 // return the created frame. 181 // return the created frame.
182 virtual WebLocalFrame* CreateChildFrame(WebLocalFrame* parent, 182 virtual WebLocalFrame* CreateChildFrame(
183 WebTreeScopeType, 183 WebLocalFrame* parent,
184 const WebString& name, 184 WebTreeScopeType,
185 const WebString& fallback_name, 185 const WebString& name,
186 WebSandboxFlags sandbox_flags, 186 const WebString& fallback_name,
187 const WebFrameOwnerProperties&) { 187 WebSandboxFlags sandbox_flags,
188 const WebParsedFeaturePolicy& container_policy,
189 const WebFrameOwnerProperties&) {
188 return nullptr; 190 return nullptr;
189 } 191 }
190 192
191 // This frame has set its opener to another frame, or disowned the opener 193 // This frame has set its opener to another frame, or disowned the opener
192 // if opener is null. See http://html.spec.whatwg.org/#dom-opener. 194 // if opener is null. See http://html.spec.whatwg.org/#dom-opener.
193 virtual void DidChangeOpener(WebFrame*) {} 195 virtual void DidChangeOpener(WebFrame*) {}
194 196
195 // Specifies the reason for the detachment. 197 // Specifies the reason for the detachment.
196 enum class DetachType { kRemove, kSwap }; 198 enum class DetachType { kRemove, kSwap };
197 199
(...skipping 17 matching lines...) Expand all
215 217
216 // This frame has been updated to a unique origin, which should be 218 // This frame has been updated to a unique origin, which should be
217 // considered potentially trustworthy if 219 // considered potentially trustworthy if
218 // |isPotentiallyTrustworthyUniqueOrigin| is true. TODO(estark): 220 // |isPotentiallyTrustworthyUniqueOrigin| is true. TODO(estark):
219 // this method only exists to support dynamic sandboxing via a CSP 221 // this method only exists to support dynamic sandboxing via a CSP
220 // delivered in a <meta> tag. This is not supposed to be allowed per 222 // delivered in a <meta> tag. This is not supposed to be allowed per
221 // the CSP spec and should be ripped out. https://crbug.com/594645 223 // the CSP spec and should be ripped out. https://crbug.com/594645
222 virtual void DidUpdateToUniqueOrigin( 224 virtual void DidUpdateToUniqueOrigin(
223 bool is_potentially_trustworthy_unique_origin) {} 225 bool is_potentially_trustworthy_unique_origin) {}
224 226
225 // The sandbox flags have changed for a child frame of this frame. 227 // The sandbox flags or container policy have changed for a child frame of
226 virtual void DidChangeSandboxFlags(WebFrame* child_frame, 228 // this frame.
227 WebSandboxFlags flags) {} 229 virtual void DidChangeFramePolicy(
230 WebFrame* child_frame,
231 WebSandboxFlags flags,
232 const WebParsedFeaturePolicy& container_policy) {}
228 233
229 // Called when a Feature-Policy HTTP header is encountered while loading the 234 // Called when a Feature-Policy HTTP header is encountered while loading the
230 // frame's document. 235 // frame's document.
231 virtual void DidSetFeaturePolicyHeader( 236 virtual void DidSetFeaturePolicyHeader(
232 const WebParsedFeaturePolicy& parsed_header) {} 237 const WebParsedFeaturePolicy& parsed_header) {}
233 238
234 // Called when a new Content Security Policy is added to the frame's 239 // Called when a new Content Security Policy is added to the frame's
235 // document. This can be triggered by handling of HTTP headers, handling 240 // document. This can be triggered by handling of HTTP headers, handling
236 // of <meta> element, or by inheriting CSP from the parent (in case of 241 // of <meta> element, or by inheriting CSP from the parent (in case of
237 // about:blank). 242 // about:blank).
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 // Overwrites the given URL to use an HTML5 embed if possible. 762 // Overwrites the given URL to use an HTML5 embed if possible.
758 // An empty URL is returned if the URL is not overriden. 763 // An empty URL is returned if the URL is not overriden.
759 virtual WebURL OverrideFlashEmbedWithHTML(const WebURL& url) { 764 virtual WebURL OverrideFlashEmbedWithHTML(const WebURL& url) {
760 return WebURL(); 765 return WebURL();
761 } 766 }
762 }; 767 };
763 768
764 } // namespace blink 769 } // namespace blink
765 770
766 #endif 771 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFrame.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698