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_scrolling( | 17 m_scrolling( |
18 static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode)), | 18 static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode)), |
19 m_marginWidth(frameOwnerProperties.marginWidth), | 19 m_marginWidth(frameOwnerProperties.marginWidth), |
20 m_marginHeight(frameOwnerProperties.marginHeight), | 20 m_marginHeight(frameOwnerProperties.marginHeight), |
21 m_allowFullscreen(frameOwnerProperties.allowFullscreen) {} | 21 m_allowFullscreen(frameOwnerProperties.allowFullscreen), |
| 22 m_csp(frameOwnerProperties.requiredCsp) {} |
22 | 23 |
23 DEFINE_TRACE(RemoteFrameOwner) { | 24 DEFINE_TRACE(RemoteFrameOwner) { |
24 visitor->trace(m_frame); | 25 visitor->trace(m_frame); |
25 FrameOwner::trace(visitor); | 26 FrameOwner::trace(visitor); |
26 } | 27 } |
27 | 28 |
28 void RemoteFrameOwner::setScrollingMode( | 29 void RemoteFrameOwner::setScrollingMode( |
29 WebFrameOwnerProperties::ScrollingMode mode) { | 30 WebFrameOwnerProperties::ScrollingMode mode) { |
30 m_scrolling = static_cast<ScrollbarMode>(mode); | 31 m_scrolling = static_cast<ScrollbarMode>(mode); |
31 } | 32 } |
32 | 33 |
33 void RemoteFrameOwner::setContentFrame(Frame& frame) { | 34 void RemoteFrameOwner::setContentFrame(Frame& frame) { |
34 m_frame = &frame; | 35 m_frame = &frame; |
35 } | 36 } |
36 | 37 |
37 void RemoteFrameOwner::clearContentFrame() { | 38 void RemoteFrameOwner::clearContentFrame() { |
38 DCHECK_EQ(m_frame->owner(), this); | 39 DCHECK_EQ(m_frame->owner(), this); |
39 m_frame = nullptr; | 40 m_frame = nullptr; |
40 } | 41 } |
41 | 42 |
42 void RemoteFrameOwner::dispatchLoad() { | 43 void RemoteFrameOwner::dispatchLoad() { |
43 WebLocalFrameImpl* webFrame = | 44 WebLocalFrameImpl* webFrame = |
44 WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame)); | 45 WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame)); |
45 webFrame->client()->dispatchLoad(); | 46 webFrame->client()->dispatchLoad(); |
46 } | 47 } |
47 | 48 |
48 } // namespace blink | 49 } // namespace blink |
OLD | NEW |