| 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" |
| 11 #include "core/frame/Settings.h" | 11 #include "core/frame/Settings.h" |
| 12 #include "core/frame/csp/ContentSecurityPolicy.h" | 12 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 13 #include "core/html/HTMLFrameOwnerElement.h" | 13 #include "core/html/HTMLFrameOwnerElement.h" |
| 14 #include "core/layout/LayoutObject.h" | 14 #include "core/layout/LayoutObject.h" |
| 15 #include "core/page/Page.h" | 15 #include "core/page/Page.h" |
| 16 #include "platform/heap/Handle.h" | 16 #include "platform/heap/Handle.h" |
| 17 #include "public/platform/WebFeaturePolicy.h" |
| 17 #include "public/platform/WebFloatRect.h" | 18 #include "public/platform/WebFloatRect.h" |
| 18 #include "public/platform/WebRect.h" | 19 #include "public/platform/WebRect.h" |
| 19 #include "public/web/WebDocument.h" | 20 #include "public/web/WebDocument.h" |
| 20 #include "public/web/WebFrameOwnerProperties.h" | 21 #include "public/web/WebFrameOwnerProperties.h" |
| 21 #include "public/web/WebPerformance.h" | 22 #include "public/web/WebPerformance.h" |
| 22 #include "public/web/WebRange.h" | 23 #include "public/web/WebRange.h" |
| 23 #include "public/web/WebTreeScopeType.h" | 24 #include "public/web/WebTreeScopeType.h" |
| 24 #include "web/RemoteFrameOwner.h" | 25 #include "web/RemoteFrameOwner.h" |
| 25 #include "web/WebLocalFrameImpl.h" | 26 #include "web/WebLocalFrameImpl.h" |
| 26 #include "web/WebViewImpl.h" | 27 #include "web/WebViewImpl.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 static_cast<SandboxFlags>(flags)); | 421 static_cast<SandboxFlags>(flags)); |
| 421 } | 422 } |
| 422 | 423 |
| 423 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, | 424 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, |
| 424 const WebString& uniqueName) const { | 425 const WebString& uniqueName) const { |
| 425 DCHECK(frame()); | 426 DCHECK(frame()); |
| 426 frame()->tree().setPrecalculatedName(name, uniqueName); | 427 frame()->tree().setPrecalculatedName(name, uniqueName); |
| 427 } | 428 } |
| 428 | 429 |
| 429 void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader( | 430 void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader( |
| 430 const WebParsedFeaturePolicy& parsedHeader) const { | 431 const WebParsedFeaturePolicyHeader& parsedHeader) const { |
| 431 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { | 432 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { |
| 432 FeaturePolicy* parentFeaturePolicy = nullptr; | 433 WebFeaturePolicy* parentFeaturePolicy = nullptr; |
| 433 if (parent()) { | 434 if (parent()) { |
| 434 Frame* parentFrame = frame()->client()->parent(); | 435 Frame* parentFrame = frame()->client()->parent(); |
| 435 parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy(); | 436 parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy(); |
| 436 } | 437 } |
| 437 frame()->securityContext()->setFeaturePolicyFromHeader(parsedHeader, | 438 frame()->securityContext()->setFeaturePolicyFromHeader(parsedHeader, |
| 438 parentFeaturePolicy); | 439 parentFeaturePolicy); |
| 439 } | 440 } |
| 440 } | 441 } |
| 441 | 442 |
| 442 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader( | 443 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader( |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 522 } |
| 522 | 523 |
| 523 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, | 524 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, |
| 524 WebRemoteFrameClient* client) | 525 WebRemoteFrameClient* client) |
| 525 : WebRemoteFrame(scope), | 526 : WebRemoteFrame(scope), |
| 526 m_frameClient(RemoteFrameClientImpl::create(this)), | 527 m_frameClient(RemoteFrameClientImpl::create(this)), |
| 527 m_client(client), | 528 m_client(client), |
| 528 m_selfKeepAlive(this) {} | 529 m_selfKeepAlive(this) {} |
| 529 | 530 |
| 530 } // namespace blink | 531 } // namespace blink |
| OLD | NEW |