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