| 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 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2814 // remote frames in the frame tree, or delaying and batching up IPCs if | 2814 // remote frames in the frame tree, or delaying and batching up IPCs if |
| 2815 // updates are happening too frequently. | 2815 // updates are happening too frequently. |
| 2816 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() || | 2816 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() || |
| 2817 render_view_->renderer_preferences_.report_frame_name_changes) { | 2817 render_view_->renderer_preferences_.report_frame_name_changes) { |
| 2818 Send(new FrameHostMsg_DidChangeName( | 2818 Send(new FrameHostMsg_DidChangeName( |
| 2819 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)), | 2819 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)), |
| 2820 base::UTF16ToUTF8(base::StringPiece16(unique_name)))); | 2820 base::UTF16ToUTF8(base::StringPiece16(unique_name)))); |
| 2821 } | 2821 } |
| 2822 } | 2822 } |
| 2823 | 2823 |
| 2824 void RenderFrameImpl::didEnforceStrictMixedContentChecking() { | 2824 void RenderFrameImpl::didEnforceInsecureRequestPolicy( |
| 2825 Send(new FrameHostMsg_EnforceStrictMixedContentChecking(routing_id_)); | 2825 blink::WebInsecureRequestPolicy policy) { |
| 2826 Send(new FrameHostMsg_EnforceInsecureRequestPolicy(routing_id_, policy)); |
| 2826 } | 2827 } |
| 2827 | 2828 |
| 2828 void RenderFrameImpl::didUpdateToUniqueOrigin( | 2829 void RenderFrameImpl::didUpdateToUniqueOrigin( |
| 2829 bool is_potentially_trustworthy_unique_origin) { | 2830 bool is_potentially_trustworthy_unique_origin) { |
| 2830 Send(new FrameHostMsg_UpdateToUniqueOrigin( | 2831 Send(new FrameHostMsg_UpdateToUniqueOrigin( |
| 2831 routing_id_, is_potentially_trustworthy_unique_origin)); | 2832 routing_id_, is_potentially_trustworthy_unique_origin)); |
| 2832 } | 2833 } |
| 2833 | 2834 |
| 2834 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, | 2835 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, |
| 2835 blink::WebSandboxFlags flags) { | 2836 blink::WebSandboxFlags flags) { |
| (...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4463 WebURLResponseExtraDataImpl* extra_data = GetExtraDataFromResponse(response); | 4464 WebURLResponseExtraDataImpl* extra_data = GetExtraDataFromResponse(response); |
| 4464 if (extra_data) | 4465 if (extra_data) |
| 4465 params.was_fetched_via_proxy = extra_data->was_fetched_via_proxy(); | 4466 params.was_fetched_via_proxy = extra_data->was_fetched_via_proxy(); |
| 4466 params.was_within_same_page = navigation_state->WasWithinSamePage(); | 4467 params.was_within_same_page = navigation_state->WasWithinSamePage(); |
| 4467 params.security_info = response.securityInfo(); | 4468 params.security_info = response.securityInfo(); |
| 4468 | 4469 |
| 4469 // Set the origin of the frame. This will be replicated to the corresponding | 4470 // Set the origin of the frame. This will be replicated to the corresponding |
| 4470 // RenderFrameProxies in other processes. | 4471 // RenderFrameProxies in other processes. |
| 4471 params.origin = frame->document().getSecurityOrigin(); | 4472 params.origin = frame->document().getSecurityOrigin(); |
| 4472 | 4473 |
| 4473 params.should_enforce_strict_mixed_content_checking = | 4474 params.insecure_request_policy = frame->getInsecureRequestPolicy(); |
| 4474 frame->shouldEnforceStrictMixedContentChecking(); | |
| 4475 | 4475 |
| 4476 params.has_potentially_trustworthy_unique_origin = | 4476 params.has_potentially_trustworthy_unique_origin = |
| 4477 frame->document().getSecurityOrigin().isUnique() && | 4477 frame->document().getSecurityOrigin().isUnique() && |
| 4478 frame->document().getSecurityOrigin().isPotentiallyTrustworthy(); | 4478 frame->document().getSecurityOrigin().isPotentiallyTrustworthy(); |
| 4479 | 4479 |
| 4480 // Set the URL to be displayed in the browser UI to the user. | 4480 // Set the URL to be displayed in the browser UI to the user. |
| 4481 params.url = GetLoadingUrl(); | 4481 params.url = GetLoadingUrl(); |
| 4482 if (frame->document().baseURL() != params.url) | 4482 if (frame->document().baseURL() != params.url) |
| 4483 params.base_url = frame->document().baseURL(); | 4483 params.base_url = frame->document().baseURL(); |
| 4484 | 4484 |
| (...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6104 // event target. Potentially a Pepper plugin will receive the event. | 6104 // event target. Potentially a Pepper plugin will receive the event. |
| 6105 // In order to tell whether a plugin gets the last mouse event and which it | 6105 // In order to tell whether a plugin gets the last mouse event and which it |
| 6106 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6106 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6107 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6107 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6108 // |pepper_last_mouse_event_target_|. | 6108 // |pepper_last_mouse_event_target_|. |
| 6109 pepper_last_mouse_event_target_ = nullptr; | 6109 pepper_last_mouse_event_target_ = nullptr; |
| 6110 #endif | 6110 #endif |
| 6111 } | 6111 } |
| 6112 | 6112 |
| 6113 } // namespace content | 6113 } // namespace content |
| OLD | NEW |