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

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

Issue 1723753002: Make Document::isSecureContext() work for OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more rebase fixups Created 4 years, 9 months 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') | media/blink/webencryptedmediaclient_impl.cc » ('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 <stdint.h> 7 #include <stdint.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) { 217 void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) {
218 DCHECK(web_frame_); 218 DCHECK(web_frame_);
219 web_frame_->setReplicatedOrigin(state.origin); 219 web_frame_->setReplicatedOrigin(state.origin);
220 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags); 220 web_frame_->setReplicatedSandboxFlags(state.sandbox_flags);
221 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name), 221 web_frame_->setReplicatedName(blink::WebString::fromUTF8(state.name),
222 blink::WebString::fromUTF8(state.unique_name)); 222 blink::WebString::fromUTF8(state.unique_name));
223 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking( 223 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking(
224 state.should_enforce_strict_mixed_content_checking); 224 state.should_enforce_strict_mixed_content_checking);
225 web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin(
226 state.has_potentially_trustworthy_unique_origin);
225 } 227 }
226 228
227 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags 229 // Update the proxy's SecurityContext and FrameOwner with new sandbox flags
228 // that were set by its parent in another process. 230 // that were set by its parent in another process.
229 // 231 //
230 // Normally, when a frame's sandbox attribute is changed dynamically, the 232 // Normally, when a frame's sandbox attribute is changed dynamically, the
231 // frame's FrameOwner is updated with the new sandbox flags right away, while 233 // frame's FrameOwner is updated with the new sandbox flags right away, while
232 // the frame's SecurityContext is updated when the frame is navigated and the 234 // the frame's SecurityContext is updated when the frame is navigated and the
233 // new sandbox flags take effect. 235 // new sandbox flags take effect.
234 // 236 //
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 web_frame_->setReplicatedName(blink::WebString::fromUTF8(name), 336 web_frame_->setReplicatedName(blink::WebString::fromUTF8(name),
335 blink::WebString::fromUTF8(unique_name)); 337 blink::WebString::fromUTF8(unique_name));
336 } 338 }
337 339
338 void RenderFrameProxy::OnEnforceStrictMixedContentChecking( 340 void RenderFrameProxy::OnEnforceStrictMixedContentChecking(
339 bool should_enforce) { 341 bool should_enforce) {
340 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking( 342 web_frame_->setReplicatedShouldEnforceStrictMixedContentChecking(
341 should_enforce); 343 should_enforce);
342 } 344 }
343 345
344 void RenderFrameProxy::OnDidUpdateOrigin(const url::Origin& origin) { 346 void RenderFrameProxy::OnDidUpdateOrigin(
347 const url::Origin& origin,
348 bool is_potentially_trustworthy_unique_origin) {
345 web_frame_->setReplicatedOrigin(origin); 349 web_frame_->setReplicatedOrigin(origin);
350 web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin(
351 is_potentially_trustworthy_unique_origin);
346 } 352 }
347 353
348 void RenderFrameProxy::OnSetPageFocus(bool is_focused) { 354 void RenderFrameProxy::OnSetPageFocus(bool is_focused) {
349 render_view_->SetFocus(is_focused); 355 render_view_->SetFocus(is_focused);
350 } 356 }
351 357
352 void RenderFrameProxy::OnSetFocusedFrame() { 358 void RenderFrameProxy::OnSetFocusedFrame() {
353 // This uses focusDocumentView rather than setFocusedFrame so that blur 359 // This uses focusDocumentView rather than setFocusedFrame so that blur
354 // events are properly dispatched on any currently focused elements. 360 // events are properly dispatched on any currently focused elements.
355 render_view_->webview()->focusDocumentView(web_frame_); 361 render_view_->webview()->focusDocumentView(web_frame_);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 blink::WebLocalFrame* source) { 470 blink::WebLocalFrame* source) {
465 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 471 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
466 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 472 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
467 } 473 }
468 474
469 void RenderFrameProxy::frameFocused() { 475 void RenderFrameProxy::frameFocused() {
470 Send(new FrameHostMsg_FrameFocused(routing_id_)); 476 Send(new FrameHostMsg_FrameFocused(routing_id_));
471 } 477 }
472 478
473 } // namespace 479 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698