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 #ifndef RemoteFrameOwner_h | 5 #ifndef RemoteFrameOwner_h |
6 #define RemoteFrameOwner_h | 6 #define RemoteFrameOwner_h |
7 | 7 |
8 #include "core/frame/FrameOwner.h" | 8 #include "core/frame/FrameOwner.h" |
9 #include "platform/scroll/ScrollTypes.h" | 9 #include "platform/scroll/ScrollTypes.h" |
10 #include "public/web/WebFrameOwnerProperties.h" | 10 #include "public/web/WebFrameOwnerProperties.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 void renderFallbackContent() override {} | 40 void renderFallbackContent() override {} |
41 | 41 |
42 AtomicString browsingContextContainerName() const override { | 42 AtomicString browsingContextContainerName() const override { |
43 return m_browsingContextContainerName; | 43 return m_browsingContextContainerName; |
44 } | 44 } |
45 ScrollbarMode scrollingMode() const override { return m_scrolling; } | 45 ScrollbarMode scrollingMode() const override { return m_scrolling; } |
46 int marginWidth() const override { return m_marginWidth; } | 46 int marginWidth() const override { return m_marginWidth; } |
47 int marginHeight() const override { return m_marginHeight; } | 47 int marginHeight() const override { return m_marginHeight; } |
48 bool allowFullscreen() const override { return m_allowFullscreen; } | 48 bool allowFullscreen() const override { return m_allowFullscreen; } |
49 bool allowPaymentRequest() const override { return m_allowPaymentRequest; } | 49 bool allowPaymentRequest() const override { return m_allowPaymentRequest; } |
| 50 bool isDisplayNone() const override { return m_isDisplayNone; } |
50 AtomicString csp() const override { return m_csp; } | 51 AtomicString csp() const override { return m_csp; } |
51 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override { | 52 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override { |
52 return m_allowedFeatures; | 53 return m_allowedFeatures; |
53 } | 54 } |
54 | 55 |
55 void setBrowsingContextContainerName(const WebString& name) { | 56 void setBrowsingContextContainerName(const WebString& name) { |
56 m_browsingContextContainerName = name; | 57 m_browsingContextContainerName = name; |
57 } | 58 } |
58 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); | 59 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); |
59 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } | 60 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } |
60 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } | 61 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } |
61 void setAllowFullscreen(bool allowFullscreen) { | 62 void setAllowFullscreen(bool allowFullscreen) { |
62 m_allowFullscreen = allowFullscreen; | 63 m_allowFullscreen = allowFullscreen; |
63 } | 64 } |
64 void setAllowPaymentRequest(bool allowPaymentRequest) { | 65 void setAllowPaymentRequest(bool allowPaymentRequest) { |
65 m_allowPaymentRequest = allowPaymentRequest; | 66 m_allowPaymentRequest = allowPaymentRequest; |
66 } | 67 } |
| 68 void setIsDisplayNone(bool isDisplayNone) { m_isDisplayNone = isDisplayNone; } |
67 void setCsp(const WebString& csp) { m_csp = csp; } | 69 void setCsp(const WebString& csp) { m_csp = csp; } |
68 void setAllowedFeatures( | 70 void setAllowedFeatures( |
69 const WebVector<WebFeaturePolicyFeature>& allowedFeatures) { | 71 const WebVector<WebFeaturePolicyFeature>& allowedFeatures) { |
70 m_allowedFeatures = allowedFeatures; | 72 m_allowedFeatures = allowedFeatures; |
71 } | 73 } |
72 | 74 |
73 DECLARE_VIRTUAL_TRACE(); | 75 DECLARE_VIRTUAL_TRACE(); |
74 | 76 |
75 private: | 77 private: |
76 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); | 78 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); |
77 | 79 |
78 // Intentionally private to prevent redundant checks when the type is | 80 // Intentionally private to prevent redundant checks when the type is |
79 // already HTMLFrameOwnerElement. | 81 // already HTMLFrameOwnerElement. |
80 bool isLocal() const override { return false; } | 82 bool isLocal() const override { return false; } |
81 bool isRemote() const override { return true; } | 83 bool isRemote() const override { return true; } |
82 | 84 |
83 Member<Frame> m_frame; | 85 Member<Frame> m_frame; |
84 SandboxFlags m_sandboxFlags; | 86 SandboxFlags m_sandboxFlags; |
85 AtomicString m_browsingContextContainerName; | 87 AtomicString m_browsingContextContainerName; |
86 ScrollbarMode m_scrolling; | 88 ScrollbarMode m_scrolling; |
87 int m_marginWidth; | 89 int m_marginWidth; |
88 int m_marginHeight; | 90 int m_marginHeight; |
89 bool m_allowFullscreen; | 91 bool m_allowFullscreen; |
90 bool m_allowPaymentRequest; | 92 bool m_allowPaymentRequest; |
| 93 bool m_isDisplayNone; |
91 WebString m_csp; | 94 WebString m_csp; |
92 WebVector<WebFeaturePolicyFeature> m_allowedFeatures; | 95 WebVector<WebFeaturePolicyFeature> m_allowedFeatures; |
93 }; | 96 }; |
94 | 97 |
95 DEFINE_TYPE_CASTS(RemoteFrameOwner, | 98 DEFINE_TYPE_CASTS(RemoteFrameOwner, |
96 FrameOwner, | 99 FrameOwner, |
97 owner, | 100 owner, |
98 owner->isRemote(), | 101 owner->isRemote(), |
99 owner.isRemote()); | 102 owner.isRemote()); |
100 | 103 |
101 } // namespace blink | 104 } // namespace blink |
102 | 105 |
103 #endif // RemoteFrameOwner_h | 106 #endif // RemoteFrameOwner_h |
OLD | NEW |