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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2506 // can be optimized further by only sending the update if there are any | 2506 // can be optimized further by only sending the update if there are any |
2507 // remote frames in the frame tree, or delaying and batching up IPCs if | 2507 // remote frames in the frame tree, or delaying and batching up IPCs if |
2508 // updates are happening too frequently. | 2508 // updates are happening too frequently. |
2509 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() || | 2509 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() || |
2510 render_view_->renderer_preferences_.report_frame_name_changes) { | 2510 render_view_->renderer_preferences_.report_frame_name_changes) { |
2511 Send(new FrameHostMsg_DidChangeName( | 2511 Send(new FrameHostMsg_DidChangeName( |
2512 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)))); | 2512 routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)))); |
2513 } | 2513 } |
2514 } | 2514 } |
2515 | 2515 |
2516 void RenderFrameImpl::didEnforceStrictMixedContentChecking() { | |
2517 Send(new FrameHostMsg_DidEnforceStrictMixedContentChecking(routing_id_)); | |
2518 } | |
2519 | |
2516 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, | 2520 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, |
2517 blink::WebSandboxFlags flags) { | 2521 blink::WebSandboxFlags flags) { |
2518 Send(new FrameHostMsg_DidChangeSandboxFlags( | 2522 Send(new FrameHostMsg_DidChangeSandboxFlags( |
2519 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); | 2523 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); |
2520 } | 2524 } |
2521 | 2525 |
2522 void RenderFrameImpl::didChangeFrameOwnerProperties( | 2526 void RenderFrameImpl::didChangeFrameOwnerProperties( |
2523 blink::WebFrame* child_frame, | 2527 blink::WebFrame* child_frame, |
2524 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 2528 const blink::WebFrameOwnerProperties& frame_owner_properties) { |
2525 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( | 2529 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4175 // TODO(alexmos): Origins for URLs with non-standard schemes are excluded due | 4179 // TODO(alexmos): Origins for URLs with non-standard schemes are excluded due |
4176 // to https://crbug.com/439608 and will be replicated as unique origins. | 4180 // to https://crbug.com/439608 and will be replicated as unique origins. |
4177 if (!is_swapped_out_) { | 4181 if (!is_swapped_out_) { |
4178 std::string scheme = frame->document().securityOrigin().protocol().utf8(); | 4182 std::string scheme = frame->document().securityOrigin().protocol().utf8(); |
4179 if (url::IsStandard(scheme.c_str(), | 4183 if (url::IsStandard(scheme.c_str(), |
4180 url::Component(0, static_cast<int>(scheme.length())))) { | 4184 url::Component(0, static_cast<int>(scheme.length())))) { |
4181 params.origin = frame->document().securityOrigin(); | 4185 params.origin = frame->document().securityOrigin(); |
4182 } | 4186 } |
4183 } | 4187 } |
4184 | 4188 |
4189 params.should_enforce_strict_mixed_content_checking = | |
4190 frame->shouldEnforceStrictMixedContentChecking(); | |
nasko
2015/12/17 17:16:33
nit: Why not put it right next to params.security_
alexmos
2015/12/17 17:43:02
Right now this is grouped together with setting th
estark
2015/12/17 22:19:11
Ok, I moved both origin and this up to where secur
| |
4191 | |
4185 if (frame->document().baseURL() != params.url) | 4192 if (frame->document().baseURL() != params.url) |
4186 params.base_url = frame->document().baseURL(); | 4193 params.base_url = frame->document().baseURL(); |
4187 | 4194 |
4188 GetRedirectChain(ds, ¶ms.redirects); | 4195 GetRedirectChain(ds, ¶ms.redirects); |
4189 params.should_update_history = !ds->hasUnreachableURL() && | 4196 params.should_update_history = !ds->hasUnreachableURL() && |
4190 !response.isMultipartPayload() && (response.httpStatusCode() != 404); | 4197 !response.isMultipartPayload() && (response.httpStatusCode() != 404); |
4191 | 4198 |
4192 params.searchable_form_url = internal_data->searchable_form_url(); | 4199 params.searchable_form_url = internal_data->searchable_form_url(); |
4193 params.searchable_form_encoding = internal_data->searchable_form_encoding(); | 4200 params.searchable_form_encoding = internal_data->searchable_form_encoding(); |
4194 | 4201 |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5463 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5470 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
5464 scoped_refptr<media::AudioOutputDevice> device = | 5471 scoped_refptr<media::AudioOutputDevice> device = |
5465 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5472 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
5466 security_origin); | 5473 security_origin); |
5467 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5474 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
5468 device->Stop(); | 5475 device->Stop(); |
5469 callback.Run(status); | 5476 callback.Run(status); |
5470 } | 5477 } |
5471 | 5478 |
5472 } // namespace content | 5479 } // namespace content |
OLD | NEW |