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

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

Issue 2520223002: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… (Closed)
Patch Set: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… Created 4 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
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 "core/dom/Fullscreen.h" 7 #include "core/dom/Fullscreen.h"
8 #include "core/dom/RemoteSecurityContext.h" 8 #include "core/dom/RemoteSecurityContext.h"
9 #include "core/dom/SecurityContext.h" 9 #include "core/dom/SecurityContext.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 static_cast<SandboxFlags>(flags)); 426 static_cast<SandboxFlags>(flags));
427 } 427 }
428 428
429 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, 429 void WebRemoteFrameImpl::setReplicatedName(const WebString& name,
430 const WebString& uniqueName) const { 430 const WebString& uniqueName) const {
431 DCHECK(frame()); 431 DCHECK(frame());
432 frame()->tree().setPrecalculatedName(name, uniqueName); 432 frame()->tree().setPrecalculatedName(name, uniqueName);
433 } 433 }
434 434
435 void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader( 435 void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader(
436 const WebString& headerValue) const { 436 const WebParsedFeaturePolicy& parsedHeader) const {
437 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { 437 if (RuntimeEnabledFeatures::featurePolicyEnabled()) {
438 FeaturePolicy* parentFeaturePolicy = nullptr; 438 FeaturePolicy* parentFeaturePolicy = nullptr;
439 if (parent()) { 439 if (parent()) {
440 Frame* parentFrame = frame()->client()->parent(); 440 Frame* parentFrame = frame()->client()->parent();
441 parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy(); 441 parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy();
442 } 442 }
443 frame()->securityContext()->setFeaturePolicyFromHeader(headerValue, 443 frame()->securityContext()->setFeaturePolicyFromHeader(parsedHeader,
444 parentFeaturePolicy); 444 parentFeaturePolicy);
445 } 445 }
446 } 446 }
447 447
448 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader( 448 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader(
449 const WebString& headerValue, 449 const WebString& headerValue,
450 WebContentSecurityPolicyType type, 450 WebContentSecurityPolicyType type,
451 WebContentSecurityPolicySource source) const { 451 WebContentSecurityPolicySource source) const {
452 frame()->securityContext()->contentSecurityPolicy()->addPolicyFromHeaderValue( 452 frame()->securityContext()->contentSecurityPolicy()->addPolicyFromHeaderValue(
453 headerValue, static_cast<ContentSecurityPolicyHeaderType>(type), 453 headerValue, static_cast<ContentSecurityPolicyHeaderType>(type),
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 530
531 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, 531 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope,
532 WebRemoteFrameClient* client) 532 WebRemoteFrameClient* client)
533 : WebRemoteFrame(scope), 533 : WebRemoteFrame(scope),
534 m_frameClient(RemoteFrameClientImpl::create(this)), 534 m_frameClient(RemoteFrameClientImpl::create(this)),
535 m_client(client), 535 m_client(client),
536 m_selfKeepAlive(this) {} 536 m_selfKeepAlive(this) {}
537 537
538 } // namespace blink 538 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.h ('k') | third_party/WebKit/public/platform/WebFeaturePolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698