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

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

Issue 1710283003: OOPIF: Handle cross-site frames being blocked by X-Frame-Options or CSP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 OnTextSurroundingSelectionRequest) 1420 OnTextSurroundingSelectionRequest)
1421 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 1421 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
1422 OnSetAccessibilityMode) 1422 OnSetAccessibilityMode)
1423 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1423 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1424 OnSnapshotAccessibilityTree) 1424 OnSnapshotAccessibilityTree)
1425 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1425 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1426 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1426 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1427 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1427 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1428 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1428 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1429 OnSetFrameOwnerProperties) 1429 OnSetFrameOwnerProperties)
1430 IPC_MESSAGE_HANDLER(FrameMsg_CancelLoadAfterXFrameOptionsOrCSPDenied,
1431 OnCancelLoadAfterXFrameOptionsOrCSPDenied)
1430 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) 1432 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
1431 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) 1433 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
1432 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1434 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1433 OnTextTrackSettingsChanged) 1435 OnTextTrackSettingsChanged)
1434 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1436 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1435 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) 1437 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation)
1436 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, 1438 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks,
1437 OnGetSavableResourceLinks) 1439 OnGetSavableResourceLinks)
1438 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1440 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
1439 OnGetSerializedHtmlWithLocalLinks) 1441 OnGetSerializedHtmlWithLocalLinks)
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { 2039 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) {
2038 frame_->setFrameOwnerSandboxFlags(flags); 2040 frame_->setFrameOwnerSandboxFlags(flags);
2039 } 2041 }
2040 2042
2041 void RenderFrameImpl::OnSetFrameOwnerProperties( 2043 void RenderFrameImpl::OnSetFrameOwnerProperties(
2042 const blink::WebFrameOwnerProperties& frame_owner_properties) { 2044 const blink::WebFrameOwnerProperties& frame_owner_properties) {
2043 DCHECK(frame_); 2045 DCHECK(frame_);
2044 frame_->setFrameOwnerProperties(frame_owner_properties); 2046 frame_->setFrameOwnerProperties(frame_owner_properties);
2045 } 2047 }
2046 2048
2049 void RenderFrameImpl::OnCancelLoadAfterXFrameOptionsOrCSPDenied() {
2050 frame_->cancelLoadAfterXFrameOptionsOrCSPDenied();
2051 }
2052
2047 void RenderFrameImpl::OnAdvanceFocus(blink::WebFocusType type, 2053 void RenderFrameImpl::OnAdvanceFocus(blink::WebFocusType type,
2048 int32_t source_routing_id) { 2054 int32_t source_routing_id) {
2049 RenderFrameProxy* source_frame = 2055 RenderFrameProxy* source_frame =
2050 RenderFrameProxy::FromRoutingID(source_routing_id); 2056 RenderFrameProxy::FromRoutingID(source_routing_id);
2051 if (!source_frame) 2057 if (!source_frame)
2052 return; 2058 return;
2053 2059
2054 render_view_->webview()->advanceFocusAcrossFrames( 2060 render_view_->webview()->advanceFocusAcrossFrames(
2055 type, source_frame->web_frame(), frame_); 2061 type, source_frame->web_frame(), frame_);
2056 } 2062 }
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 } 2787 }
2782 2788
2783 void RenderFrameImpl::didChangeFrameOwnerProperties( 2789 void RenderFrameImpl::didChangeFrameOwnerProperties(
2784 blink::WebFrame* child_frame, 2790 blink::WebFrame* child_frame,
2785 const blink::WebFrameOwnerProperties& frame_owner_properties) { 2791 const blink::WebFrameOwnerProperties& frame_owner_properties) {
2786 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( 2792 Send(new FrameHostMsg_DidChangeFrameOwnerProperties(
2787 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), 2793 routing_id_, GetRoutingIdForFrameOrProxy(child_frame),
2788 frame_owner_properties)); 2794 frame_owner_properties));
2789 } 2795 }
2790 2796
2797 void RenderFrameImpl::didCancelLoadAfterXFrameOptionsOrCSPDenied() {
2798 Send(
2799 new FrameHostMsg_DidCancelLoadAfterXFrameOptionsOrCSPDenied(routing_id_));
2800 }
2801
2791 void RenderFrameImpl::didMatchCSS( 2802 void RenderFrameImpl::didMatchCSS(
2792 blink::WebLocalFrame* frame, 2803 blink::WebLocalFrame* frame,
2793 const blink::WebVector<blink::WebString>& newly_matching_selectors, 2804 const blink::WebVector<blink::WebString>& newly_matching_selectors,
2794 const blink::WebVector<blink::WebString>& stopped_matching_selectors) { 2805 const blink::WebVector<blink::WebString>& stopped_matching_selectors) {
2795 DCHECK_EQ(frame_, frame); 2806 DCHECK_EQ(frame_, frame);
2796 2807
2797 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, 2808 FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
2798 DidMatchCSS(newly_matching_selectors, 2809 DidMatchCSS(newly_matching_selectors,
2799 stopped_matching_selectors)); 2810 stopped_matching_selectors));
2800 } 2811 }
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
6117 int match_count, 6128 int match_count,
6118 int ordinal, 6129 int ordinal,
6119 const WebRect& selection_rect, 6130 const WebRect& selection_rect,
6120 bool final_status_update) { 6131 bool final_status_update) {
6121 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6132 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6122 selection_rect, ordinal, 6133 selection_rect, ordinal,
6123 final_status_update)); 6134 final_status_update));
6124 } 6135 }
6125 6136
6126 } // namespace content 6137 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698