| 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 "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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 headerValue, | 651 headerValue, |
| 652 static_cast<ContentSecurityPolicyHeaderType>(type), | 652 static_cast<ContentSecurityPolicyHeaderType>(type), |
| 653 static_cast<ContentSecurityPolicyHeaderSource>(source)); | 653 static_cast<ContentSecurityPolicyHeaderSource>(source)); |
| 654 } | 654 } |
| 655 | 655 |
| 656 void WebRemoteFrameImpl::resetReplicatedContentSecurityPolicy() const | 656 void WebRemoteFrameImpl::resetReplicatedContentSecurityPolicy() const |
| 657 { | 657 { |
| 658 frame()->securityContext()->resetReplicatedContentSecurityPolicy(); | 658 frame()->securityContext()->resetReplicatedContentSecurityPolicy(); |
| 659 } | 659 } |
| 660 | 660 |
| 661 void WebRemoteFrameImpl::setReplicatedShouldEnforceStrictMixedContentChecking(bo
ol shouldEnforce) const | 661 void WebRemoteFrameImpl::setReplicatedInsecureRequestPolicy(WebInsecureRequestPo
licy policy) const |
| 662 { | 662 { |
| 663 DCHECK(frame()); | 663 DCHECK(frame()); |
| 664 WebInsecureRequestPolicy oldPolicy = frame()->securityContext()->getInsecure
RequestPolicy(); | 664 frame()->securityContext()->setInsecureRequestPolicy(policy); |
| 665 WebInsecureRequestPolicy newPolicy = shouldEnforce ? oldPolicy | kBlockAllMi
xedContent : oldPolicy & ~kBlockAllMixedContent; | |
| 666 frame()->securityContext()->setInsecureRequestPolicy(newPolicy); | |
| 667 } | 665 } |
| 668 | 666 |
| 669 void WebRemoteFrameImpl::setReplicatedPotentiallyTrustworthyUniqueOrigin(bool is
UniqueOriginPotentiallyTrustworthy) const | 667 void WebRemoteFrameImpl::setReplicatedPotentiallyTrustworthyUniqueOrigin(bool is
UniqueOriginPotentiallyTrustworthy) const |
| 670 { | 668 { |
| 671 DCHECK(frame()); | 669 DCHECK(frame()); |
| 672 // If |isUniqueOriginPotentiallyTrustworthy| is true, then the origin must b
e unique. | 670 // If |isUniqueOriginPotentiallyTrustworthy| is true, then the origin must b
e unique. |
| 673 DCHECK(!isUniqueOriginPotentiallyTrustworthy || frame()->securityContext()->
getSecurityOrigin()->isUnique()); | 671 DCHECK(!isUniqueOriginPotentiallyTrustworthy || frame()->securityContext()->
getSecurityOrigin()->isUnique()); |
| 674 frame()->securityContext()->getSecurityOrigin()->setUniqueOriginIsPotentiall
yTrustworthy(isUniqueOriginPotentiallyTrustworthy); | 672 frame()->securityContext()->getSecurityOrigin()->setUniqueOriginIsPotentiall
yTrustworthy(isUniqueOriginPotentiallyTrustworthy); |
| 675 } | 673 } |
| 676 | 674 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 | 726 |
| 729 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli
ent* client) | 727 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli
ent* client) |
| 730 : WebRemoteFrame(scope) | 728 : WebRemoteFrame(scope) |
| 731 , m_frameClient(RemoteFrameClientImpl::create(this)) | 729 , m_frameClient(RemoteFrameClientImpl::create(this)) |
| 732 , m_client(client) | 730 , m_client(client) |
| 733 , m_selfKeepAlive(this) | 731 , m_selfKeepAlive(this) |
| 734 { | 732 { |
| 735 } | 733 } |
| 736 | 734 |
| 737 } // namespace blink | 735 } // namespace blink |
| OLD | NEW |