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