OLD | NEW |
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 Loading... |
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::didUpdateToUniqueOrigin( |
| 2790 bool is_potentially_trustworthy_unique_origin) { |
| 2791 Send(new FrameHostMsg_UpdateToUniqueOrigin( |
| 2792 routing_id_, is_potentially_trustworthy_unique_origin)); |
| 2793 } |
| 2794 |
2789 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, | 2795 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, |
2790 blink::WebSandboxFlags flags) { | 2796 blink::WebSandboxFlags flags) { |
2791 Send(new FrameHostMsg_DidChangeSandboxFlags( | 2797 Send(new FrameHostMsg_DidChangeSandboxFlags( |
2792 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); | 2798 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); |
2793 } | 2799 } |
2794 | 2800 |
2795 void RenderFrameImpl::didChangeFrameOwnerProperties( | 2801 void RenderFrameImpl::didChangeFrameOwnerProperties( |
2796 blink::WebFrame* child_frame, | 2802 blink::WebFrame* child_frame, |
2797 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 2803 const blink::WebFrameOwnerProperties& frame_owner_properties) { |
2798 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( | 2804 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4477 std::string scheme = frame->document().securityOrigin().protocol().utf8(); | 4483 std::string scheme = frame->document().securityOrigin().protocol().utf8(); |
4478 if (url::IsStandard(scheme.c_str(), | 4484 if (url::IsStandard(scheme.c_str(), |
4479 url::Component(0, static_cast<int>(scheme.length())))) { | 4485 url::Component(0, static_cast<int>(scheme.length())))) { |
4480 params.origin = frame->document().securityOrigin(); | 4486 params.origin = frame->document().securityOrigin(); |
4481 } | 4487 } |
4482 } | 4488 } |
4483 | 4489 |
4484 params.should_enforce_strict_mixed_content_checking = | 4490 params.should_enforce_strict_mixed_content_checking = |
4485 frame->shouldEnforceStrictMixedContentChecking(); | 4491 frame->shouldEnforceStrictMixedContentChecking(); |
4486 | 4492 |
| 4493 params.has_potentially_trustworthy_unique_origin = |
| 4494 frame->document().securityOrigin().isUnique() && |
| 4495 frame->document().securityOrigin().isPotentiallyTrustworthy(); |
| 4496 |
4487 // Set the URL to be displayed in the browser UI to the user. | 4497 // Set the URL to be displayed in the browser UI to the user. |
4488 params.url = GetLoadingUrl(); | 4498 params.url = GetLoadingUrl(); |
4489 DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL)); | 4499 DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL)); |
4490 | 4500 |
4491 if (frame->document().baseURL() != params.url) | 4501 if (frame->document().baseURL() != params.url) |
4492 params.base_url = frame->document().baseURL(); | 4502 params.base_url = frame->document().baseURL(); |
4493 | 4503 |
4494 GetRedirectChain(ds, ¶ms.redirects); | 4504 GetRedirectChain(ds, ¶ms.redirects); |
4495 params.should_update_history = !ds->hasUnreachableURL() && | 4505 params.should_update_history = !ds->hasUnreachableURL() && |
4496 !response.isMultipartPayload() && (response.httpStatusCode() != 404); | 4506 !response.isMultipartPayload() && (response.httpStatusCode() != 404); |
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6130 int match_count, | 6140 int match_count, |
6131 int ordinal, | 6141 int ordinal, |
6132 const WebRect& selection_rect, | 6142 const WebRect& selection_rect, |
6133 bool final_status_update) { | 6143 bool final_status_update) { |
6134 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6144 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6135 selection_rect, ordinal, | 6145 selection_rect, ordinal, |
6136 final_status_update)); | 6146 final_status_update)); |
6137 } | 6147 } |
6138 | 6148 |
6139 } // namespace content | 6149 } // namespace content |
OLD | NEW |