| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy.h" | 5 #include "content/renderer/render_frame_proxy.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 void RenderFrameProxy::DidCommitCompositorFrame() { | 206 void RenderFrameProxy::DidCommitCompositorFrame() { |
| 207 } | 207 } |
| 208 | 208 |
| 209 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { | 209 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { |
| 210 DCHECK(web_frame_); | 210 DCHECK(web_frame_); |
| 211 web_frame_->setReplicatedOrigin(state.origin); | 211 web_frame_->setReplicatedOrigin(state.origin); |
| 212 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags); | 212 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags); |
| 213 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name), | 213 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name), |
| 214 blink::WebString::fromUTF8(state.unique_name)); | 214 blink::WebString::fromUTF8(state.unique_name)); |
| 215 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking( | 215 web_frame_->setReplicatedInsecureRequestPolicy(state.insecure_request_policy); |
| 216 state.should_enforce_strict_mixed_content_checking); | |
| 217 web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin( | 216 web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin( |
| 218 state.has_potentially_trustworthy_unique_origin); | 217 state.has_potentially_trustworthy_unique_origin); |
| 219 | 218 |
| 220 web_frame_->resetReplicatedContentSecurityPolicy(); | 219 web_frame_->resetReplicatedContentSecurityPolicy(); |
| 221 for (const auto& header : state.accumulated_csp_headers) | 220 for (const auto& header : state.accumulated_csp_headers) |
| 222 OnAddContentSecurityPolicy(header); | 221 OnAddContentSecurityPolicy(header); |
| 223 } | 222 } |
| 224 | 223 |
| 225 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags | 224 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags |
| 226 // that were set by its parent in another process. | 225 // that were set by its parent in another process. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 259 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
| 261 IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading) | 260 IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading) |
| 262 IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading) | 261 IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading) |
| 263 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 262 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
| 264 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) | 263 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) |
| 265 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName) | 264 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName) |
| 266 IPC_MESSAGE_HANDLER(FrameMsg_AddContentSecurityPolicy, | 265 IPC_MESSAGE_HANDLER(FrameMsg_AddContentSecurityPolicy, |
| 267 OnAddContentSecurityPolicy) | 266 OnAddContentSecurityPolicy) |
| 268 IPC_MESSAGE_HANDLER(FrameMsg_ResetContentSecurityPolicy, | 267 IPC_MESSAGE_HANDLER(FrameMsg_ResetContentSecurityPolicy, |
| 269 OnResetContentSecurityPolicy) | 268 OnResetContentSecurityPolicy) |
| 270 IPC_MESSAGE_HANDLER(FrameMsg_EnforceStrictMixedContentChecking, | 269 IPC_MESSAGE_HANDLER(FrameMsg_EnforceInsecureRequestPolicy, |
| 271 OnEnforceStrictMixedContentChecking) | 270 OnEnforceInsecureRequestPolicy) |
| 272 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 271 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
| 273 OnSetFrameOwnerProperties) | 272 OnSetFrameOwnerProperties) |
| 274 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateOrigin, OnDidUpdateOrigin) | 273 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateOrigin, OnDidUpdateOrigin) |
| 275 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus) | 274 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus) |
| 276 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 275 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
| 277 IPC_MESSAGE_HANDLER(FrameMsg_WillEnterFullscreen, OnWillEnterFullscreen) | 276 IPC_MESSAGE_HANDLER(FrameMsg_WillEnterFullscreen, OnWillEnterFullscreen) |
| 278 IPC_MESSAGE_UNHANDLED(handled = false) | 277 IPC_MESSAGE_UNHANDLED(handled = false) |
| 279 IPC_END_MESSAGE_MAP() | 278 IPC_END_MESSAGE_MAP() |
| 280 | 279 |
| 281 // Note: If |handled| is true, |this| may have been deleted. | 280 // Note: If |handled| is true, |this| may have been deleted. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 const ContentSecurityPolicyHeader& header) { | 343 const ContentSecurityPolicyHeader& header) { |
| 345 web_frame_->addReplicatedContentSecurityPolicyHeader( | 344 web_frame_->addReplicatedContentSecurityPolicyHeader( |
| 346 blink::WebString::fromUTF8(header.header_value), header.type, | 345 blink::WebString::fromUTF8(header.header_value), header.type, |
| 347 header.source); | 346 header.source); |
| 348 } | 347 } |
| 349 | 348 |
| 350 void RenderFrameProxy::OnResetContentSecurityPolicy() { | 349 void RenderFrameProxy::OnResetContentSecurityPolicy() { |
| 351 web_frame_->resetReplicatedContentSecurityPolicy(); | 350 web_frame_->resetReplicatedContentSecurityPolicy(); |
| 352 } | 351 } |
| 353 | 352 |
| 354 void RenderFrameProxy::OnEnforceStrictMixedContentChecking( | 353 void RenderFrameProxy::OnEnforceInsecureRequestPolicy( |
| 355 bool should_enforce) { | 354 blink::WebInsecureRequestPolicy policy) { |
| 356 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking( | 355 web_frame_->setReplicatedInsecureRequestPolicy(policy); |
| 357 should_enforce); | |
| 358 } | 356 } |
| 359 | 357 |
| 360 void RenderFrameProxy::OnSetFrameOwnerProperties( | 358 void RenderFrameProxy::OnSetFrameOwnerProperties( |
| 361 const blink::WebFrameOwnerProperties& properties) { | 359 const blink::WebFrameOwnerProperties& properties) { |
| 362 web_frame_->setFrameOwnerProperties(properties); | 360 web_frame_->setFrameOwnerProperties(properties); |
| 363 } | 361 } |
| 364 | 362 |
| 365 void RenderFrameProxy::OnDidUpdateOrigin( | 363 void RenderFrameProxy::OnDidUpdateOrigin( |
| 366 const url::Origin& origin, | 364 const url::Origin& origin, |
| 367 bool is_potentially_trustworthy_unique_origin) { | 365 bool is_potentially_trustworthy_unique_origin) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 blink::WebLocalFrame* source) { | 490 blink::WebLocalFrame* source) { |
| 493 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 491 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 494 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 492 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 495 } | 493 } |
| 496 | 494 |
| 497 void RenderFrameProxy::frameFocused() { | 495 void RenderFrameProxy::frameFocused() { |
| 498 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 496 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 499 } | 497 } |
| 500 | 498 |
| 501 } // namespace | 499 } // namespace |
| OLD | NEW |