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 "config.h" | 5 #include "config.h" |
6 #include "public/web/WebFrame.h" | 6 #include "public/web/WebFrame.h" |
7 | 7 |
8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
9 #include "core/frame/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
11 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
12 #include "core/frame/RemoteFrame.h" | 12 #include "core/frame/RemoteFrame.h" |
13 #include "core/html/HTMLFrameElementBase.h" | 13 #include "core/html/HTMLFrameElementBase.h" |
14 #include "core/html/HTMLFrameOwnerElement.h" | 14 #include "core/html/HTMLFrameOwnerElement.h" |
15 #include "core/page/Page.h" | 15 #include "core/page/Page.h" |
16 #include "platform/UserGestureIndicator.h" | 16 #include "platform/UserGestureIndicator.h" |
17 #include "platform/heap/Handle.h" | 17 #include "platform/heap/Handle.h" |
18 #include "public/web/WebElement.h" | 18 #include "public/web/WebElement.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/RemoteBridgeFrameOwner.h" | 22 #include "web/RemoteBridgeFrameOwner.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 { |
27 | 28 |
28 Frame* toCoreFrame(const WebFrame* frame) | 29 Frame* toCoreFrame(const WebFrame* frame) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 | 140 |
140 void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags) | 141 void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags) |
141 { | 142 { |
142 // At the moment, this is only used to replicate sandbox flags | 143 // At the moment, this is only used to replicate sandbox flags |
143 // for frames with a remote owner. | 144 // for frames with a remote owner. |
144 FrameOwner* owner = toCoreFrame(this)->owner(); | 145 FrameOwner* owner = toCoreFrame(this)->owner(); |
145 ASSERT(owner); | 146 ASSERT(owner); |
146 toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(f lags)); | 147 toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(f lags)); |
147 } | 148 } |
148 | 149 |
150 void WebFrame::setFrameOwnerProperties(const WebFrameOwnerProperties& frameOwner Properties) | |
dcheng
2015/10/15 06:06:53
Unlike sandbox flags, this is only called on WebLo
lazyboy
2015/10/15 16:56:38
Done.
| |
151 { | |
152 // At the moment, this is only used to replicate frame owner properties | |
153 // for frames with a remote owner. | |
154 FrameOwner* owner = toCoreFrame(this)->owner(); | |
155 ASSERT(owner); | |
156 toRemoteBridgeFrameOwner(owner)->setScrollingMode(frameOwnerProperties.scrol lingMode); | |
157 | |
158 toRemoteBridgeFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginW idth); | |
159 toRemoteBridgeFrameOwner(owner)->setMarginHeight(frameOwnerProperties.margin Height); | |
160 } | |
161 | |
149 WebFrame* WebFrame::opener() const | 162 WebFrame* WebFrame::opener() const |
150 { | 163 { |
151 return m_opener; | 164 return m_opener; |
152 } | 165 } |
153 | 166 |
154 void WebFrame::setOpener(WebFrame* opener) | 167 void WebFrame::setOpener(WebFrame* opener) |
155 { | 168 { |
156 if (m_opener) | 169 if (m_opener) |
157 m_opener->m_openedFrameTracker->remove(this); | 170 m_opener->m_openedFrameTracker->remove(this); |
158 if (opener) | 171 if (opener) |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
359 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ | 372 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ |
360 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } | 373 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } |
361 | 374 |
362 DEFINE_VISITOR_METHOD(Visitor*) | 375 DEFINE_VISITOR_METHOD(Visitor*) |
363 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) | 376 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) |
364 | 377 |
365 #undef DEFINE_VISITOR_METHOD | 378 #undef DEFINE_VISITOR_METHOD |
366 #endif | 379 #endif |
367 | 380 |
368 } // namespace blink | 381 } // namespace blink |
OLD | NEW |