OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef FrameOwner_h | 5 #ifndef FrameOwner_h |
6 #define FrameOwner_h | 6 #define FrameOwner_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/dom/SandboxFlags.h" | 9 #include "core/dom/SandboxFlags.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Returns the 'name' content attribute value of the browsing context | 43 // Returns the 'name' content attribute value of the browsing context |
44 // container. | 44 // container. |
45 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta
iner | 45 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta
iner |
46 virtual AtomicString browsingContextContainerName() const = 0; | 46 virtual AtomicString browsingContextContainerName() const = 0; |
47 virtual ScrollbarMode scrollingMode() const = 0; | 47 virtual ScrollbarMode scrollingMode() const = 0; |
48 virtual int marginWidth() const = 0; | 48 virtual int marginWidth() const = 0; |
49 virtual int marginHeight() const = 0; | 49 virtual int marginHeight() const = 0; |
50 virtual bool allowFullscreen() const = 0; | 50 virtual bool allowFullscreen() const = 0; |
51 virtual bool allowPaymentRequest() const = 0; | 51 virtual bool allowPaymentRequest() const = 0; |
| 52 virtual bool isDisplayNone() const = 0; |
52 virtual AtomicString csp() const = 0; | 53 virtual AtomicString csp() const = 0; |
53 virtual const WebVector<mojom::blink::PermissionName>& delegatedPermissions() | 54 virtual const WebVector<mojom::blink::PermissionName>& delegatedPermissions() |
54 const = 0; | 55 const = 0; |
55 virtual const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const = 0; | 56 virtual const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const = 0; |
56 }; | 57 }; |
57 | 58 |
58 // TODO(dcheng): This class is an internal implementation detail of provisional | 59 // TODO(dcheng): This class is an internal implementation detail of provisional |
59 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies | 60 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies |
60 // on it. | 61 // on it. |
61 class CORE_EXPORT DummyFrameOwner | 62 class CORE_EXPORT DummyFrameOwner |
(...skipping 15 matching lines...) Expand all Loading... |
77 bool canRenderFallbackContent() const override { return false; } | 78 bool canRenderFallbackContent() const override { return false; } |
78 void renderFallbackContent() override {} | 79 void renderFallbackContent() override {} |
79 AtomicString browsingContextContainerName() const override { | 80 AtomicString browsingContextContainerName() const override { |
80 return AtomicString(); | 81 return AtomicString(); |
81 } | 82 } |
82 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } | 83 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } |
83 int marginWidth() const override { return -1; } | 84 int marginWidth() const override { return -1; } |
84 int marginHeight() const override { return -1; } | 85 int marginHeight() const override { return -1; } |
85 bool allowFullscreen() const override { return false; } | 86 bool allowFullscreen() const override { return false; } |
86 bool allowPaymentRequest() const override { return false; } | 87 bool allowPaymentRequest() const override { return false; } |
| 88 bool isDisplayNone() const override { return false; } |
87 AtomicString csp() const override { return nullAtom; } | 89 AtomicString csp() const override { return nullAtom; } |
88 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() | 90 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() |
89 const override { | 91 const override { |
90 DEFINE_STATIC_LOCAL(WebVector<mojom::blink::PermissionName>, permissions, | 92 DEFINE_STATIC_LOCAL(WebVector<mojom::blink::PermissionName>, permissions, |
91 ()); | 93 ()); |
92 return permissions; | 94 return permissions; |
93 } | 95 } |
94 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override { | 96 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override { |
95 DEFINE_STATIC_LOCAL(WebVector<WebFeaturePolicyFeature>, features, ()); | 97 DEFINE_STATIC_LOCAL(WebVector<WebFeaturePolicyFeature>, features, ()); |
96 return features; | 98 return features; |
97 } | 99 } |
98 | 100 |
99 private: | 101 private: |
100 // Intentionally private to prevent redundant checks when the type is | 102 // Intentionally private to prevent redundant checks when the type is |
101 // already DummyFrameOwner. | 103 // already DummyFrameOwner. |
102 bool isLocal() const override { return false; } | 104 bool isLocal() const override { return false; } |
103 bool isRemote() const override { return false; } | 105 bool isRemote() const override { return false; } |
104 }; | 106 }; |
105 | 107 |
106 } // namespace blink | 108 } // namespace blink |
107 | 109 |
108 #endif // FrameOwner_h | 110 #endif // FrameOwner_h |
OLD | NEW |