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

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 2483703002: Replicate feature policy headers to remote frames (Closed)
Patch Set: Addressing review comments Created 4 years, 1 month 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/data/feature-policy-main.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/renderer/render_frame_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { 220 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) {
221 DCHECK(web_frame_); 221 DCHECK(web_frame_);
222 web_frame_->setReplicatedOrigin(state.origin); 222 web_frame_->setReplicatedOrigin(state.origin);
223 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags); 223 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags);
224 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name), 224 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name),
225 blink::WebString::fromUTF8(state.unique_name)); 225 blink::WebString::fromUTF8(state.unique_name));
226 web_frame_->setReplicatedInsecureRequestPolicy(state.insecure_request_policy); 226 web_frame_->setReplicatedInsecureRequestPolicy(state.insecure_request_policy);
227 web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin( 227 web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin(
228 state.has_potentially_trustworthy_unique_origin); 228 state.has_potentially_trustworthy_unique_origin);
229 web_frame_->setReplicatedFeaturePolicyHeader(
230 blink::WebString::fromUTF8(state.feature_policy_header));
229 231
230 web_frame_->resetReplicatedContentSecurityPolicy(); 232 web_frame_->resetReplicatedContentSecurityPolicy();
231 for (const auto& header : state.accumulated_csp_headers) 233 for (const auto& header : state.accumulated_csp_headers)
232 OnAddContentSecurityPolicy(header); 234 OnAddContentSecurityPolicy(header);
233 } 235 }
234 236
235 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags 237 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags
236 // that were set by its parent in another process. 238 // that were set by its parent in another process.
237 // 239 //
238 // Normally, when a frame's sandbox attribute is changed dynamically, the 240 // Normally, when a frame's sandbox attribute is changed dynamically, the
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 blink::WebLocalFrame* source) { 509 blink::WebLocalFrame* source) {
508 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 510 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
509 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 511 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
510 } 512 }
511 513
512 void RenderFrameProxy::frameFocused() { 514 void RenderFrameProxy::frameFocused() {
513 Send(new FrameHostMsg_FrameFocused(routing_id_)); 515 Send(new FrameHostMsg_FrameFocused(routing_id_));
514 } 516 }
515 517
516 } // namespace 518 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/data/feature-policy-main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698