| 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 "public/web/WebFrame.h" | 5 #include "public/web/WebFrame.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/WindowProxyManager.h" | 7 #include "bindings/core/v8/WindowProxyManager.h" |
| 8 #include "core/frame/FrameHost.h" | 8 #include "core/frame/FrameHost.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| 11 #include "core/frame/RemoteFrame.h" | 11 #include "core/frame/RemoteFrame.h" |
| 12 #include "core/html/HTMLFrameElementBase.h" | 12 #include "core/html/HTMLFrameElementBase.h" |
| 13 #include "core/html/HTMLFrameOwnerElement.h" | 13 #include "core/html/HTMLFrameOwnerElement.h" |
| 14 #include "core/page/Page.h" | 14 #include "core/page/Page.h" |
| 15 #include "platform/UserGestureIndicator.h" | 15 #include "platform/UserGestureIndicator.h" |
| 16 #include "platform/heap/Handle.h" | 16 #include "platform/heap/Handle.h" |
| 17 #include "public/platform/WebInsecureRequestPolicy.h" |
| 17 #include "public/web/WebElement.h" | 18 #include "public/web/WebElement.h" |
| 18 #include "public/web/WebFrameOwnerProperties.h" | 19 #include "public/web/WebFrameOwnerProperties.h" |
| 19 #include "public/web/WebSandboxFlags.h" | 20 #include "public/web/WebSandboxFlags.h" |
| 20 #include "web/OpenedFrameTracker.h" | 21 #include "web/OpenedFrameTracker.h" |
| 21 #include "web/RemoteFrameOwner.h" | 22 #include "web/RemoteFrameOwner.h" |
| 22 #include "web/WebLocalFrameImpl.h" | 23 #include "web/WebLocalFrameImpl.h" |
| 23 #include "web/WebRemoteFrameImpl.h" | 24 #include "web/WebRemoteFrameImpl.h" |
| 24 #include <algorithm> | 25 #include <algorithm> |
| 25 | 26 |
| 26 namespace blink { | 27 namespace blink { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 { | 125 { |
| 125 // At the moment, this is only used to replicate sandbox flags | 126 // At the moment, this is only used to replicate sandbox flags |
| 126 // for frames with a remote owner. | 127 // for frames with a remote owner. |
| 127 FrameOwner* owner = toImplBase()->frame()->owner(); | 128 FrameOwner* owner = toImplBase()->frame()->owner(); |
| 128 DCHECK(owner); | 129 DCHECK(owner); |
| 129 toRemoteFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags))
; | 130 toRemoteFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags))
; |
| 130 } | 131 } |
| 131 | 132 |
| 132 bool WebFrame::shouldEnforceStrictMixedContentChecking() const | 133 bool WebFrame::shouldEnforceStrictMixedContentChecking() const |
| 133 { | 134 { |
| 134 return toImplBase()->frame()->securityContext()->shouldEnforceStrictMixedCon
tentChecking(); | 135 return toImplBase()->frame()->securityContext()->getInsecureRequestPolicy()
& kBlockAllMixedContent; |
| 135 } | 136 } |
| 136 | 137 |
| 137 void WebFrame::setFrameOwnerProperties(const WebFrameOwnerProperties& properties
) | 138 void WebFrame::setFrameOwnerProperties(const WebFrameOwnerProperties& properties
) |
| 138 { | 139 { |
| 139 // At the moment, this is only used to replicate frame owner properties | 140 // At the moment, this is only used to replicate frame owner properties |
| 140 // for frames with a remote owner. | 141 // for frames with a remote owner. |
| 141 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner())
; | 142 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner())
; |
| 142 DCHECK(owner); | 143 DCHECK(owner); |
| 143 owner->setScrollingMode(properties.scrollingMode); | 144 owner->setScrollingMode(properties.scrollingMode); |
| 144 owner->setMarginWidth(properties.marginWidth); | 145 owner->setMarginWidth(properties.marginWidth); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 void WebFrame::traceFrame(VisitorDispatcher visitor, WebFrame* frame) { trac
eFrameImpl(visitor, frame); } \ | 373 void WebFrame::traceFrame(VisitorDispatcher visitor, WebFrame* frame) { trac
eFrameImpl(visitor, frame); } \ |
| 373 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra
ceFramesImpl(visitor, frame); } \ | 374 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra
ceFramesImpl(visitor, frame); } \ |
| 374 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI
mpl(visitor); } | 375 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI
mpl(visitor); } |
| 375 | 376 |
| 376 DEFINE_VISITOR_METHOD(Visitor*) | 377 DEFINE_VISITOR_METHOD(Visitor*) |
| 377 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) | 378 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) |
| 378 | 379 |
| 379 #undef DEFINE_VISITOR_METHOD | 380 #undef DEFINE_VISITOR_METHOD |
| 380 | 381 |
| 381 } // namespace blink | 382 } // namespace blink |
| OLD | NEW |