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

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 1489253002: Plumb document's strict mixed content checking for RemoteFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko comments Created 5 years 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_proxy.h ('k') | content/test/test_render_frame_host.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 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 <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void RenderFrameProxy::DidCommitCompositorFrame() { 175 void RenderFrameProxy::DidCommitCompositorFrame() {
176 if (compositing_helper_.get()) 176 if (compositing_helper_.get())
177 compositing_helper_->DidCommitCompositorFrame(); 177 compositing_helper_->DidCommitCompositorFrame();
178 } 178 }
179 179
180 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { 180 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) {
181 DCHECK(web_frame_); 181 DCHECK(web_frame_);
182 web_frame_->setReplicatedOrigin(state.origin); 182 web_frame_->setReplicatedOrigin(state.origin);
183 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags); 183 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags);
184 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name)); 184 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name));
185 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking(
186 state.should_enforce_strict_mixed_content_checking);
185 } 187 }
186 188
187 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags 189 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags
188 // that were set by its parent in another process. 190 // that were set by its parent in another process.
189 // 191 //
190 // Normally, when a frame's sandbox attribute is changed dynamically, the 192 // Normally, when a frame's sandbox attribute is changed dynamically, the
191 // frame's FrameOwner is updated with the new sandbox flags right away, while 193 // frame's FrameOwner is updated with the new sandbox flags right away, while
192 // the frame's SecurityContext is updated when the frame is navigated and the 194 // the frame's SecurityContext is updated when the frame is navigated and the
193 // new sandbox flags take effect. 195 // new sandbox flags take effect.
194 // 196 //
(...skipping 17 matching lines...) Expand all
212 IPC_MESSAGE_HANDLER(FrameMsg_ChildFrameProcessGone, OnChildFrameProcessGone) 214 IPC_MESSAGE_HANDLER(FrameMsg_ChildFrameProcessGone, OnChildFrameProcessGone)
213 IPC_MESSAGE_HANDLER_GENERIC(FrameMsg_CompositorFrameSwapped, 215 IPC_MESSAGE_HANDLER_GENERIC(FrameMsg_CompositorFrameSwapped,
214 OnCompositorFrameSwapped(msg)) 216 OnCompositorFrameSwapped(msg))
215 IPC_MESSAGE_HANDLER(FrameMsg_SetChildFrameSurface, OnSetChildFrameSurface) 217 IPC_MESSAGE_HANDLER(FrameMsg_SetChildFrameSurface, OnSetChildFrameSurface)
216 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 218 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
217 IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading) 219 IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading)
218 IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading) 220 IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading)
219 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 221 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
220 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) 222 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad)
221 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName) 223 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName)
224 IPC_MESSAGE_HANDLER(FrameMsg_EnforceStrictMixedContentChecking,
225 OnEnforceStrictMixedContentChecking)
222 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateOrigin, OnDidUpdateOrigin) 226 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateOrigin, OnDidUpdateOrigin)
223 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus) 227 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus)
224 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) 228 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
225 IPC_MESSAGE_UNHANDLED(handled = false) 229 IPC_MESSAGE_UNHANDLED(handled = false)
226 IPC_END_MESSAGE_MAP() 230 IPC_END_MESSAGE_MAP()
227 231
228 // Note: If |handled| is true, |this| may have been deleted. 232 // Note: If |handled| is true, |this| may have been deleted.
229 return handled; 233 return handled;
230 } 234 }
231 235
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 327 }
324 328
325 void RenderFrameProxy::OnDispatchLoad() { 329 void RenderFrameProxy::OnDispatchLoad() {
326 web_frame_->DispatchLoadEventForFrameOwner(); 330 web_frame_->DispatchLoadEventForFrameOwner();
327 } 331 }
328 332
329 void RenderFrameProxy::OnDidUpdateName(const std::string& name) { 333 void RenderFrameProxy::OnDidUpdateName(const std::string& name) {
330 web_frame_->setReplicatedName(blink::WebString::fromUTF8(name)); 334 web_frame_->setReplicatedName(blink::WebString::fromUTF8(name));
331 } 335 }
332 336
337 void RenderFrameProxy::OnEnforceStrictMixedContentChecking(
338 bool should_enforce) {
339 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking(
340 should_enforce);
341 }
342
333 void RenderFrameProxy::OnDidUpdateOrigin(const url::Origin& origin) { 343 void RenderFrameProxy::OnDidUpdateOrigin(const url::Origin& origin) {
334 web_frame_->setReplicatedOrigin(origin); 344 web_frame_->setReplicatedOrigin(origin);
335 } 345 }
336 346
337 void RenderFrameProxy::OnSetPageFocus(bool is_focused) { 347 void RenderFrameProxy::OnSetPageFocus(bool is_focused) {
338 render_view_->SetFocus(is_focused); 348 render_view_->SetFocus(is_focused);
339 } 349 }
340 350
341 void RenderFrameProxy::OnSetFocusedFrame() { 351 void RenderFrameProxy::OnSetFocusedFrame() {
342 // This uses focusDocumentView rather than setFocusedFrame so that blur 352 // This uses focusDocumentView rather than setFocusedFrame so that blur
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); 454 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id));
445 } 455 }
446 456
447 void RenderFrameProxy::advanceFocus(blink::WebFocusType type, 457 void RenderFrameProxy::advanceFocus(blink::WebFocusType type,
448 blink::WebLocalFrame* source) { 458 blink::WebLocalFrame* source) {
449 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 459 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
450 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 460 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
451 } 461 }
452 462
453 } // namespace 463 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | content/test/test_render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698