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

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: more rebase fixups 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('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 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 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 Send(new FrameHostMsg_DidChangeName( 2725 Send(new FrameHostMsg_DidChangeName(
2726 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)), 2726 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)),
2727 base::UTF16ToUTF8(base::StringPiece16(unique_name)))); 2727 base::UTF16ToUTF8(base::StringPiece16(unique_name))));
2728 } 2728 }
2729 } 2729 }
2730 2730
2731 void RenderFrameImpl::didEnforceStrictMixedContentChecking() { 2731 void RenderFrameImpl::didEnforceStrictMixedContentChecking() {
2732 Send(new FrameHostMsg_EnforceStrictMixedContentChecking(routing_id_)); 2732 Send(new FrameHostMsg_EnforceStrictMixedContentChecking(routing_id_));
2733 } 2733 }
2734 2734
2735 void RenderFrameImpl::didUpdateToUniqueOrigin(
2736 bool is_potentially_trustworthy_unique_origin) {
2737 Send(new FrameHostMsg_UpdateToUniqueOrigin(
2738 routing_id_, is_potentially_trustworthy_unique_origin));
2739 }
2740
2735 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, 2741 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame,
2736 blink::WebSandboxFlags flags) { 2742 blink::WebSandboxFlags flags) {
2737 Send(new FrameHostMsg_DidChangeSandboxFlags( 2743 Send(new FrameHostMsg_DidChangeSandboxFlags(
2738 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); 2744 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags));
2739 } 2745 }
2740 2746
2741 void RenderFrameImpl::didChangeFrameOwnerProperties( 2747 void RenderFrameImpl::didChangeFrameOwnerProperties(
2742 blink::WebFrame* child_frame, 2748 blink::WebFrame* child_frame,
2743 const blink::WebFrameOwnerProperties& frame_owner_properties) { 2749 const blink::WebFrameOwnerProperties& frame_owner_properties) {
2744 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( 2750 Send(new FrameHostMsg_DidChangeFrameOwnerProperties(
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4410 frame->document().getSecurityOrigin().protocol().utf8(); 4416 frame->document().getSecurityOrigin().protocol().utf8();
4411 if (url::IsStandard(scheme.c_str(), 4417 if (url::IsStandard(scheme.c_str(),
4412 url::Component(0, static_cast<int>(scheme.length())))) { 4418 url::Component(0, static_cast<int>(scheme.length())))) {
4413 params.origin = frame->document().getSecurityOrigin(); 4419 params.origin = frame->document().getSecurityOrigin();
4414 } 4420 }
4415 } 4421 }
4416 4422
4417 params.should_enforce_strict_mixed_content_checking = 4423 params.should_enforce_strict_mixed_content_checking =
4418 frame->shouldEnforceStrictMixedContentChecking(); 4424 frame->shouldEnforceStrictMixedContentChecking();
4419 4425
4426 params.has_potentially_trustworthy_unique_origin =
4427 frame->document().getSecurityOrigin().isUnique() &&
4428 frame->document().getSecurityOrigin().isPotentiallyTrustworthy();
4429
4420 // Set the URL to be displayed in the browser UI to the user. 4430 // Set the URL to be displayed in the browser UI to the user.
4421 params.url = GetLoadingUrl(); 4431 params.url = GetLoadingUrl();
4422 DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL)); 4432 DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL));
4423 4433
4424 if (frame->document().baseURL() != params.url) 4434 if (frame->document().baseURL() != params.url)
4425 params.base_url = frame->document().baseURL(); 4435 params.base_url = frame->document().baseURL();
4426 4436
4427 GetRedirectChain(ds, &params.redirects); 4437 GetRedirectChain(ds, &params.redirects);
4428 params.should_update_history = 4438 params.should_update_history =
4429 !ds->hasUnreachableURL() && response.httpStatusCode() != 404; 4439 !ds->hasUnreachableURL() && response.httpStatusCode() != 404;
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
6068 int match_count, 6078 int match_count,
6069 int ordinal, 6079 int ordinal,
6070 const WebRect& selection_rect, 6080 const WebRect& selection_rect,
6071 bool final_status_update) { 6081 bool final_status_update) {
6072 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6082 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6073 selection_rect, ordinal, 6083 selection_rect, ordinal,
6074 final_status_update)); 6084 final_status_update));
6075 } 6085 }
6076 6086
6077 } // namespace content 6087 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698