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

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

Issue 1723753002: Make Document::isSecureContext() work for OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix WebRemoteFrameImpl assert 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 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 Send(new FrameHostMsg_DidChangeName( 2779 Send(new FrameHostMsg_DidChangeName(
2780 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)), 2780 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)),
2781 base::UTF16ToUTF8(base::StringPiece16(unique_name)))); 2781 base::UTF16ToUTF8(base::StringPiece16(unique_name))));
2782 } 2782 }
2783 } 2783 }
2784 2784
2785 void RenderFrameImpl::didEnforceStrictMixedContentChecking() { 2785 void RenderFrameImpl::didEnforceStrictMixedContentChecking() {
2786 Send(new FrameHostMsg_EnforceStrictMixedContentChecking(routing_id_)); 2786 Send(new FrameHostMsg_EnforceStrictMixedContentChecking(routing_id_));
2787 } 2787 }
2788 2788
2789 void RenderFrameImpl::didSetUniqueOriginPotentiallyTrustworthy() {
2790 Send(new FrameHostMsg_SetUniqueOriginPotentiallyTrustworthy(routing_id_));
2791 }
2792
2789 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, 2793 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame,
2790 blink::WebSandboxFlags flags) { 2794 blink::WebSandboxFlags flags) {
2791 Send(new FrameHostMsg_DidChangeSandboxFlags( 2795 Send(new FrameHostMsg_DidChangeSandboxFlags(
2792 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); 2796 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags));
2793 } 2797 }
2794 2798
2795 void RenderFrameImpl::didChangeFrameOwnerProperties( 2799 void RenderFrameImpl::didChangeFrameOwnerProperties(
2796 blink::WebFrame* child_frame, 2800 blink::WebFrame* child_frame,
2797 const blink::WebFrameOwnerProperties& frame_owner_properties) { 2801 const blink::WebFrameOwnerProperties& frame_owner_properties) {
2798 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( 2802 Send(new FrameHostMsg_DidChangeFrameOwnerProperties(
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
4477 std::string scheme = frame->document().securityOrigin().protocol().utf8(); 4481 std::string scheme = frame->document().securityOrigin().protocol().utf8();
4478 if (url::IsStandard(scheme.c_str(), 4482 if (url::IsStandard(scheme.c_str(),
4479 url::Component(0, static_cast<int>(scheme.length())))) { 4483 url::Component(0, static_cast<int>(scheme.length())))) {
4480 params.origin = frame->document().securityOrigin(); 4484 params.origin = frame->document().securityOrigin();
4481 } 4485 }
4482 } 4486 }
4483 4487
4484 params.should_enforce_strict_mixed_content_checking = 4488 params.should_enforce_strict_mixed_content_checking =
4485 frame->shouldEnforceStrictMixedContentChecking(); 4489 frame->shouldEnforceStrictMixedContentChecking();
4486 4490
4491 params.is_potentially_trustworthy_unique_origin =
4492 frame->document().securityOrigin().isUnique() &&
4493 frame->document().securityOrigin().isPotentiallyTrustworthy();
4494
4487 // Set the URL to be displayed in the browser UI to the user. 4495 // Set the URL to be displayed in the browser UI to the user.
4488 params.url = GetLoadingUrl(); 4496 params.url = GetLoadingUrl();
4489 DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL)); 4497 DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL));
4490 4498
4491 if (frame->document().baseURL() != params.url) 4499 if (frame->document().baseURL() != params.url)
4492 params.base_url = frame->document().baseURL(); 4500 params.base_url = frame->document().baseURL();
4493 4501
4494 GetRedirectChain(ds, &params.redirects); 4502 GetRedirectChain(ds, &params.redirects);
4495 params.should_update_history = !ds->hasUnreachableURL() && 4503 params.should_update_history = !ds->hasUnreachableURL() &&
4496 !response.isMultipartPayload() && (response.httpStatusCode() != 404); 4504 !response.isMultipartPayload() && (response.httpStatusCode() != 404);
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
6130 int match_count, 6138 int match_count,
6131 int ordinal, 6139 int ordinal,
6132 const WebRect& selection_rect, 6140 const WebRect& selection_rect,
6133 bool final_status_update) { 6141 bool final_status_update) {
6134 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6142 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6135 selection_rect, ordinal, 6143 selection_rect, ordinal,
6136 final_status_update)); 6144 final_status_update));
6137 } 6145 }
6138 6146
6139 } // namespace content 6147 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698