OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be found | 2 // Use of this source code is governed by a BSD-style license that can be found |
3 // in the LICENSE file. | 3 // in the LICENSE file. |
4 | 4 |
5 #include "web/RemoteFrameOwner.h" | 5 #include "web/RemoteFrameOwner.h" |
6 | 6 |
7 #include "core/frame/LocalFrame.h" | 7 #include "core/frame/LocalFrame.h" |
8 #include "public/web/WebFrameClient.h" | 8 #include "public/web/WebFrameClient.h" |
9 #include "web/WebLocalFrameImpl.h" | 9 #include "web/WebLocalFrameImpl.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 RemoteFrameOwner::RemoteFrameOwner( | 13 RemoteFrameOwner::RemoteFrameOwner( |
14 SandboxFlags flags, | 14 SandboxFlags flags, |
15 const WebFrameOwnerProperties& frameOwnerProperties) | 15 const WebFrameOwnerProperties& frameOwnerProperties) |
16 : m_sandboxFlags(flags), | 16 : m_sandboxFlags(flags), |
17 m_browsingContextContainerName( | 17 m_browsingContextContainerName( |
18 static_cast<String>(frameOwnerProperties.name)), | 18 static_cast<String>(frameOwnerProperties.name)), |
19 m_scrolling( | 19 m_scrolling( |
20 static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode)), | 20 static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode)), |
21 m_marginWidth(frameOwnerProperties.marginWidth), | 21 m_marginWidth(frameOwnerProperties.marginWidth), |
22 m_marginHeight(frameOwnerProperties.marginHeight), | 22 m_marginHeight(frameOwnerProperties.marginHeight), |
23 m_allowFullscreen(frameOwnerProperties.allowFullscreen), | 23 m_allowFullscreen(frameOwnerProperties.allowFullscreen), |
24 m_allowPaymentRequest(frameOwnerProperties.allowPaymentRequest), | 24 m_allowPaymentRequest(frameOwnerProperties.allowPaymentRequest), |
| 25 m_isDisplayNone(frameOwnerProperties.isDisplayNone), |
25 m_csp(frameOwnerProperties.requiredCsp) {} | 26 m_csp(frameOwnerProperties.requiredCsp) {} |
26 | 27 |
27 DEFINE_TRACE(RemoteFrameOwner) { | 28 DEFINE_TRACE(RemoteFrameOwner) { |
28 visitor->trace(m_frame); | 29 visitor->trace(m_frame); |
29 FrameOwner::trace(visitor); | 30 FrameOwner::trace(visitor); |
30 } | 31 } |
31 | 32 |
32 void RemoteFrameOwner::setScrollingMode( | 33 void RemoteFrameOwner::setScrollingMode( |
33 WebFrameOwnerProperties::ScrollingMode mode) { | 34 WebFrameOwnerProperties::ScrollingMode mode) { |
34 m_scrolling = static_cast<ScrollbarMode>(mode); | 35 m_scrolling = static_cast<ScrollbarMode>(mode); |
35 } | 36 } |
36 | 37 |
37 void RemoteFrameOwner::setContentFrame(Frame& frame) { | 38 void RemoteFrameOwner::setContentFrame(Frame& frame) { |
38 m_frame = &frame; | 39 m_frame = &frame; |
39 } | 40 } |
40 | 41 |
41 void RemoteFrameOwner::clearContentFrame() { | 42 void RemoteFrameOwner::clearContentFrame() { |
42 DCHECK_EQ(m_frame->owner(), this); | 43 DCHECK_EQ(m_frame->owner(), this); |
43 m_frame = nullptr; | 44 m_frame = nullptr; |
44 } | 45 } |
45 | 46 |
46 void RemoteFrameOwner::dispatchLoad() { | 47 void RemoteFrameOwner::dispatchLoad() { |
47 WebLocalFrameImpl* webFrame = | 48 WebLocalFrameImpl* webFrame = |
48 WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame)); | 49 WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame)); |
49 webFrame->client()->dispatchLoad(); | 50 webFrame->client()->dispatchLoad(); |
50 } | 51 } |
51 | 52 |
52 } // namespace blink | 53 } // namespace blink |
OLD | NEW |