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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 AtomicString csp() const override { return m_csp; } | 50 AtomicString csp() const override { return m_csp; } |
51 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() | 51 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() |
52 const override { | 52 const override { |
53 return m_delegatedPermissions; | 53 return m_delegatedPermissions; |
54 } | 54 } |
| 55 const WebVector<WebFeaturePolicyFeature>& allowedFeatureNames() |
| 56 const override { |
| 57 return m_allowedFeatureNames; |
| 58 } |
55 | 59 |
56 void setBrowsingContextContainerName(const WebString& name) { | 60 void setBrowsingContextContainerName(const WebString& name) { |
57 m_browsingContextContainerName = name; | 61 m_browsingContextContainerName = name; |
58 } | 62 } |
59 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); | 63 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); |
60 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } | 64 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } |
61 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } | 65 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } |
62 void setAllowFullscreen(bool allowFullscreen) { | 66 void setAllowFullscreen(bool allowFullscreen) { |
63 m_allowFullscreen = allowFullscreen; | 67 m_allowFullscreen = allowFullscreen; |
64 } | 68 } |
65 void setAllowPaymentRequest(bool allowPaymentRequest) { | 69 void setAllowPaymentRequest(bool allowPaymentRequest) { |
66 m_allowPaymentRequest = allowPaymentRequest; | 70 m_allowPaymentRequest = allowPaymentRequest; |
67 } | 71 } |
68 void setCsp(const WebString& csp) { m_csp = csp; } | 72 void setCsp(const WebString& csp) { m_csp = csp; } |
69 void setDelegatedpermissions( | 73 void setDelegatedpermissions( |
70 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) { | 74 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) { |
71 m_delegatedPermissions = delegatedPermissions; | 75 m_delegatedPermissions = delegatedPermissions; |
72 } | 76 } |
| 77 void setAllowedFeatureNames( |
| 78 const WebVector<WebFeaturePolicyFeature>& allowedFeatureNames) { |
| 79 m_allowedFeatureNames = allowedFeatureNames; |
| 80 } |
73 | 81 |
74 DECLARE_VIRTUAL_TRACE(); | 82 DECLARE_VIRTUAL_TRACE(); |
75 | 83 |
76 private: | 84 private: |
77 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); | 85 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); |
78 | 86 |
79 // Intentionally private to prevent redundant checks when the type is | 87 // Intentionally private to prevent redundant checks when the type is |
80 // already HTMLFrameOwnerElement. | 88 // already HTMLFrameOwnerElement. |
81 bool isLocal() const override { return false; } | 89 bool isLocal() const override { return false; } |
82 bool isRemote() const override { return true; } | 90 bool isRemote() const override { return true; } |
83 | 91 |
84 Member<Frame> m_frame; | 92 Member<Frame> m_frame; |
85 SandboxFlags m_sandboxFlags; | 93 SandboxFlags m_sandboxFlags; |
86 AtomicString m_browsingContextContainerName; | 94 AtomicString m_browsingContextContainerName; |
87 ScrollbarMode m_scrolling; | 95 ScrollbarMode m_scrolling; |
88 int m_marginWidth; | 96 int m_marginWidth; |
89 int m_marginHeight; | 97 int m_marginHeight; |
90 bool m_allowFullscreen; | 98 bool m_allowFullscreen; |
91 bool m_allowPaymentRequest; | 99 bool m_allowPaymentRequest; |
92 WebString m_csp; | 100 WebString m_csp; |
93 WebVector<mojom::blink::PermissionName> m_delegatedPermissions; | 101 WebVector<mojom::blink::PermissionName> m_delegatedPermissions; |
| 102 WebVector<WebFeaturePolicyFeature> m_allowedFeatureNames; |
94 }; | 103 }; |
95 | 104 |
96 DEFINE_TYPE_CASTS(RemoteFrameOwner, | 105 DEFINE_TYPE_CASTS(RemoteFrameOwner, |
97 FrameOwner, | 106 FrameOwner, |
98 owner, | 107 owner, |
99 owner->isRemote(), | 108 owner->isRemote(), |
100 owner.isRemote()); | 109 owner.isRemote()); |
101 | 110 |
102 } // namespace blink | 111 } // namespace blink |
103 | 112 |
104 #endif // RemoteFrameOwner_h | 113 #endif // RemoteFrameOwner_h |
OLD | NEW |