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

Side by Side Diff: third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp

Issue 2858113002: Use replicated container policy in remote frames (Closed)
Patch Set: Remove null check Created 3 years, 7 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 | « no previous file | no next file » | 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 "web/WebRemoteFrameImpl.h" 5 #include "web/WebRemoteFrameImpl.h"
6 6
7 #include "bindings/core/v8/WindowProxy.h" 7 #include "bindings/core/v8/WindowProxy.h"
8 #include "core/dom/Fullscreen.h" 8 #include "core/dom/Fullscreen.h"
9 #include "core/dom/RemoteSecurityContext.h" 9 #include "core/dom/RemoteSecurityContext.h"
10 #include "core/dom/SecurityContext.h" 10 #include "core/dom/SecurityContext.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 void WebRemoteFrameImpl::SetReplicatedFeaturePolicyHeader( 419 void WebRemoteFrameImpl::SetReplicatedFeaturePolicyHeader(
420 const WebParsedFeaturePolicy& parsed_header) { 420 const WebParsedFeaturePolicy& parsed_header) {
421 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { 421 if (RuntimeEnabledFeatures::featurePolicyEnabled()) {
422 WebFeaturePolicy* parent_feature_policy = nullptr; 422 WebFeaturePolicy* parent_feature_policy = nullptr;
423 if (Parent()) { 423 if (Parent()) {
424 Frame* parent_frame = GetFrame()->Client()->Parent(); 424 Frame* parent_frame = GetFrame()->Client()->Parent();
425 parent_feature_policy = 425 parent_feature_policy =
426 parent_frame->GetSecurityContext()->GetFeaturePolicy(); 426 parent_frame->GetSecurityContext()->GetFeaturePolicy();
427 } 427 }
428 WebParsedFeaturePolicy container_policy; 428 WebParsedFeaturePolicy container_policy;
429 if (GetFrame() && GetFrame()->Owner()) { 429 if (GetFrame()->Owner())
430 container_policy = GetContainerPolicyFromAllowedFeatures( 430 container_policy = GetFrame()->Owner()->ContainerPolicy();
431 GetFrame()->Owner()->AllowedFeatures(),
432 GetFrame()->Owner()->AllowFullscreen(),
433 GetFrame()->Owner()->AllowPaymentRequest(),
434 GetFrame()->GetSecurityContext()->GetSecurityOrigin());
435 }
436 GetFrame()->GetSecurityContext()->InitializeFeaturePolicy( 431 GetFrame()->GetSecurityContext()->InitializeFeaturePolicy(
437 parsed_header, container_policy, parent_feature_policy); 432 parsed_header, container_policy, parent_feature_policy);
438 } 433 }
439 } 434 }
440 435
441 void WebRemoteFrameImpl::AddReplicatedContentSecurityPolicyHeader( 436 void WebRemoteFrameImpl::AddReplicatedContentSecurityPolicyHeader(
442 const WebString& header_value, 437 const WebString& header_value,
443 WebContentSecurityPolicyType type, 438 WebContentSecurityPolicyType type,
444 WebContentSecurityPolicySource source) { 439 WebContentSecurityPolicySource source) {
445 GetFrame() 440 GetFrame()
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 531 }
537 532
538 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, 533 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope,
539 WebRemoteFrameClient* client) 534 WebRemoteFrameClient* client)
540 : WebRemoteFrame(scope), 535 : WebRemoteFrame(scope),
541 frame_client_(RemoteFrameClientImpl::Create(this)), 536 frame_client_(RemoteFrameClientImpl::Create(this)),
542 client_(client), 537 client_(client),
543 self_keep_alive_(this) {} 538 self_keep_alive_(this) {}
544 539
545 } // namespace blink 540 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698