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/RemoteSecurityContext.h" |
| 8 #include "core/dom/SecurityContext.h" |
7 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
8 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| 11 #include "core/frame/csp/ContentSecurityPolicy.h" |
9 #include "core/html/HTMLFrameOwnerElement.h" | 12 #include "core/html/HTMLFrameOwnerElement.h" |
10 #include "core/layout/LayoutObject.h" | 13 #include "core/layout/LayoutObject.h" |
11 #include "core/page/Page.h" | 14 #include "core/page/Page.h" |
12 #include "platform/heap/Handle.h" | 15 #include "platform/heap/Handle.h" |
13 #include "public/platform/WebFloatRect.h" | 16 #include "public/platform/WebFloatRect.h" |
14 #include "public/platform/WebRect.h" | 17 #include "public/platform/WebRect.h" |
15 #include "public/web/WebDocument.h" | 18 #include "public/web/WebDocument.h" |
16 #include "public/web/WebFrameOwnerProperties.h" | 19 #include "public/web/WebFrameOwnerProperties.h" |
17 #include "public/web/WebPerformance.h" | 20 #include "public/web/WebPerformance.h" |
18 #include "public/web/WebRange.h" | 21 #include "public/web/WebRange.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 DCHECK(frame()); | 643 DCHECK(frame()); |
641 frame()->securityContext()->enforceSandboxFlags(static_cast<SandboxFlags>(fl
ags)); | 644 frame()->securityContext()->enforceSandboxFlags(static_cast<SandboxFlags>(fl
ags)); |
642 } | 645 } |
643 | 646 |
644 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, const WebStrin
g& uniqueName) const | 647 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, const WebStrin
g& uniqueName) const |
645 { | 648 { |
646 DCHECK(frame()); | 649 DCHECK(frame()); |
647 frame()->tree().setPrecalculatedName(name, uniqueName); | 650 frame()->tree().setPrecalculatedName(name, uniqueName); |
648 } | 651 } |
649 | 652 |
| 653 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader(const WebStrin
g& headerValue, WebContentSecurityPolicyType type, WebContentSecurityPolicySourc
e source) const |
| 654 { |
| 655 frame()->securityContext()->contentSecurityPolicy()->replicateHeader( |
| 656 headerValue, |
| 657 static_cast<ContentSecurityPolicyHeaderType>(type), |
| 658 static_cast<ContentSecurityPolicyHeaderSource>(source)); |
| 659 } |
| 660 |
| 661 void WebRemoteFrameImpl::resetReplicatedContentSecurityPolicy() const |
| 662 { |
| 663 frame()->securityContext()->resetReplicatedContentSecurityPolicy(); |
| 664 } |
| 665 |
650 void WebRemoteFrameImpl::setReplicatedShouldEnforceStrictMixedContentChecking(bo
ol shouldEnforce) const | 666 void WebRemoteFrameImpl::setReplicatedShouldEnforceStrictMixedContentChecking(bo
ol shouldEnforce) const |
651 { | 667 { |
652 DCHECK(frame()); | 668 DCHECK(frame()); |
653 frame()->securityContext()->setShouldEnforceStrictMixedContentChecking(shoul
dEnforce); | 669 frame()->securityContext()->setShouldEnforceStrictMixedContentChecking(shoul
dEnforce); |
654 } | 670 } |
655 | 671 |
656 void WebRemoteFrameImpl::setReplicatedPotentiallyTrustworthyUniqueOrigin(bool is
UniqueOriginPotentiallyTrustworthy) const | 672 void WebRemoteFrameImpl::setReplicatedPotentiallyTrustworthyUniqueOrigin(bool is
UniqueOriginPotentiallyTrustworthy) const |
657 { | 673 { |
658 DCHECK(frame()); | 674 DCHECK(frame()); |
659 // If |isUniqueOriginPotentiallyTrustworthy| is true, then the origin must b
e unique. | 675 // If |isUniqueOriginPotentiallyTrustworthy| is true, then the origin must b
e unique. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 708 |
693 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli
ent* client) | 709 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli
ent* client) |
694 : WebRemoteFrame(scope) | 710 : WebRemoteFrame(scope) |
695 , m_frameClient(RemoteFrameClientImpl::create(this)) | 711 , m_frameClient(RemoteFrameClientImpl::create(this)) |
696 , m_client(client) | 712 , m_client(client) |
697 , m_selfKeepAlive(this) | 713 , m_selfKeepAlive(this) |
698 { | 714 { |
699 } | 715 } |
700 | 716 |
701 } // namespace blink | 717 } // namespace blink |
OLD | NEW |