| Index: content/browser/frame_host/render_frame_proxy_host.cc
|
| diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
|
| index 63be6ebbcc661af2c504d123b99cdc111c002216..8f1d9d5c3a663f7d69e89de73f550b445ad37950 100644
|
| --- a/content/browser/frame_host/render_frame_proxy_host.cc
|
| +++ b/content/browser/frame_host/render_frame_proxy_host.cc
|
| @@ -135,6 +135,8 @@ bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) {
|
| IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
|
| + IPC_MESSAGE_HANDLER(FrameHostMsg_ForwardContentSecurityPolicyViolation,
|
| + OnForwardContentSecurityPolicyViolation)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_RouteMessageEvent, OnRouteMessageEvent)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus)
|
| @@ -268,6 +270,18 @@ void RenderFrameProxyHost::OnOpenURL(
|
| params.resource_request_body);
|
| }
|
|
|
| +void RenderFrameProxyHost::OnForwardContentSecurityPolicyViolation(
|
| + const ContentSecurityPolicyViolation& violation) {
|
| + // Verify that we are in the same BrowsingInstance as the current
|
| + // RenderFrameHost.
|
| + RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host();
|
| + if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance()))
|
| + return;
|
| +
|
| + current_rfh->Send(new FrameMsg_ReportContentSecurityPolicyViolation(
|
| + current_rfh->GetRoutingID(), violation));
|
| +}
|
| +
|
| void RenderFrameProxyHost::OnRouteMessageEvent(
|
| const FrameMsg_PostMessage_Params& params) {
|
| RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host();
|
|
|