| 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 <v8/include/v8.h> |
| 7 #include "core/dom/Fullscreen.h" | 8 #include "core/dom/Fullscreen.h" |
| 8 #include "core/dom/RemoteSecurityContext.h" | 9 #include "core/dom/RemoteSecurityContext.h" |
| 9 #include "core/dom/SecurityContext.h" | 10 #include "core/dom/SecurityContext.h" |
| 10 #include "core/frame/FrameView.h" | 11 #include "core/frame/FrameView.h" |
| 11 #include "core/frame/Settings.h" | 12 #include "core/frame/Settings.h" |
| 12 #include "core/frame/csp/ContentSecurityPolicy.h" | 13 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 13 #include "core/html/HTMLFrameOwnerElement.h" | 14 #include "core/html/HTMLFrameOwnerElement.h" |
| 14 #include "core/layout/LayoutObject.h" | 15 #include "core/layout/LayoutObject.h" |
| 15 #include "core/page/Page.h" | 16 #include "core/page/Page.h" |
| 16 #include "platform/heap/Handle.h" | 17 #include "platform/heap/Handle.h" |
| 18 #include "public/platform/WebFeaturePolicy.h" |
| 17 #include "public/platform/WebFloatRect.h" | 19 #include "public/platform/WebFloatRect.h" |
| 18 #include "public/platform/WebRect.h" | 20 #include "public/platform/WebRect.h" |
| 19 #include "public/web/WebDocument.h" | 21 #include "public/web/WebDocument.h" |
| 20 #include "public/web/WebFrameOwnerProperties.h" | 22 #include "public/web/WebFrameOwnerProperties.h" |
| 21 #include "public/web/WebPerformance.h" | 23 #include "public/web/WebPerformance.h" |
| 22 #include "public/web/WebRange.h" | 24 #include "public/web/WebRange.h" |
| 23 #include "public/web/WebTreeScopeType.h" | 25 #include "public/web/WebTreeScopeType.h" |
| 24 #include "web/RemoteFrameOwner.h" | 26 #include "web/RemoteFrameOwner.h" |
| 25 #include "web/WebLocalFrameImpl.h" | 27 #include "web/WebLocalFrameImpl.h" |
| 26 #include "web/WebViewImpl.h" | 28 #include "web/WebViewImpl.h" |
| 27 #include <v8/include/v8.h> | |
| 28 | 29 |
| 29 namespace blink { | 30 namespace blink { |
| 30 | 31 |
| 31 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, | 32 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, |
| 32 WebRemoteFrameClient* client, | 33 WebRemoteFrameClient* client, |
| 33 WebFrame* opener) { | 34 WebFrame* opener) { |
| 34 return WebRemoteFrameImpl::create(scope, client, opener); | 35 return WebRemoteFrameImpl::create(scope, client, opener); |
| 35 } | 36 } |
| 36 | 37 |
| 37 WebRemoteFrameImpl* WebRemoteFrameImpl::create(WebTreeScopeType scope, | 38 WebRemoteFrameImpl* WebRemoteFrameImpl::create(WebTreeScopeType scope, |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 426 |
| 426 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, | 427 void WebRemoteFrameImpl::setReplicatedName(const WebString& name, |
| 427 const WebString& uniqueName) const { | 428 const WebString& uniqueName) const { |
| 428 DCHECK(frame()); | 429 DCHECK(frame()); |
| 429 frame()->tree().setPrecalculatedName(name, uniqueName); | 430 frame()->tree().setPrecalculatedName(name, uniqueName); |
| 430 } | 431 } |
| 431 | 432 |
| 432 void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader( | 433 void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader( |
| 433 const WebParsedFeaturePolicyHeader& parsedHeader) const { | 434 const WebParsedFeaturePolicyHeader& parsedHeader) const { |
| 434 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { | 435 if (RuntimeEnabledFeatures::featurePolicyEnabled()) { |
| 435 FeaturePolicy* parentFeaturePolicy = nullptr; | 436 WebFeaturePolicy* parentFeaturePolicy = nullptr; |
| 436 if (parent()) { | 437 if (parent()) { |
| 437 Frame* parentFrame = frame()->client()->parent(); | 438 Frame* parentFrame = frame()->client()->parent(); |
| 438 parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy(); | 439 parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy(); |
| 439 } | 440 } |
| 440 frame()->securityContext()->setFeaturePolicyFromHeader(parsedHeader, | 441 frame()->securityContext()->setFeaturePolicyFromHeader(parsedHeader, |
| 441 parentFeaturePolicy); | 442 parentFeaturePolicy); |
| 442 } | 443 } |
| 443 } | 444 } |
| 444 | 445 |
| 445 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader( | 446 void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader( |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 } | 532 } |
| 532 | 533 |
| 533 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, | 534 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, |
| 534 WebRemoteFrameClient* client) | 535 WebRemoteFrameClient* client) |
| 535 : WebRemoteFrame(scope), | 536 : WebRemoteFrame(scope), |
| 536 m_frameClient(RemoteFrameClientImpl::create(this)), | 537 m_frameClient(RemoteFrameClientImpl::create(this)), |
| 537 m_client(client), | 538 m_client(client), |
| 538 m_selfKeepAlive(this) {} | 539 m_selfKeepAlive(this) {} |
| 539 | 540 |
| 540 } // namespace blink | 541 } // namespace blink |
| OLD | NEW |