Index: content/renderer/render_frame_proxy.cc |
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc |
index 0707dfdb34d4843d1459300f08a5d9dbbc29a2a5..b42dec7004f6a1fcdd4d92576fe4637a70fe6c0c 100644 |
--- a/content/renderer/render_frame_proxy.cc |
+++ b/content/renderer/render_frame_proxy.cc |
@@ -127,7 +127,9 @@ RenderFrameProxy* RenderFrameProxy::CreateFrameProxy( |
web_frame = parent->web_frame()->createRemoteChild( |
replicated_state.scope, |
blink::WebString::fromUTF8(replicated_state.name), |
- replicated_state.sandbox_flags, proxy.get(), opener); |
+ replicated_state.sandbox_flags, |
+ FeaturePolicyHeaderToWeb(replicated_state.container_policy), |
lunalu1
2017/04/05 22:30:03
same here
iclelland
2017/04/09 03:25:54
Sorry, not sure what this refers to
|
+ proxy.get(), opener); |
proxy->unique_name_ = replicated_state.unique_name; |
render_view = parent->render_view(); |
render_widget = parent->render_widget(); |
@@ -235,7 +237,7 @@ void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { |
} |
// Update the proxy's SecurityContext and FrameOwner with new sandbox flags |
-// that were set by its parent in another process. |
+// and container policy that were set by its parent in another process. |
// |
// Normally, when a frame's sandbox attribute is changed dynamically, the |
// frame's FrameOwner is updated with the new sandbox flags right away, while |
@@ -250,9 +252,13 @@ void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { |
// properly if this proxy ever parents a local frame. The proxy's FrameOwner |
// flags are also updated here with the caveat that the FrameOwner won't learn |
// about updates to its flags until they take effect. |
-void RenderFrameProxy::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { |
+void RenderFrameProxy::OnDidUpdateFramePolicy( |
+ blink::WebSandboxFlags flags, |
+ const ParsedFeaturePolicyHeader& container_policy) { |
lunalu1
2017/04/05 22:30:03
Can we rename ParsedFeaturePolicyHeader to ParsedF
iclelland
2017/04/09 03:25:54
I'll file another CL to rename that, to avoid maki
|
web_frame_->setReplicatedSandboxFlags(flags); |
web_frame_->setFrameOwnerSandboxFlags(flags); |
+ web_frame_->setFrameOwnerContainerPolicy( |
+ FeaturePolicyHeaderToWeb(container_policy)); |
} |
bool RenderFrameProxy::OnMessageReceived(const IPC::Message& msg) { |
@@ -272,7 +278,7 @@ bool RenderFrameProxy::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading) |
IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading) |
- IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
+ IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateFramePolicy, OnDidUpdateFramePolicy) |
IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) |
IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName) |
IPC_MESSAGE_HANDLER(FrameMsg_AddContentSecurityPolicies, |