| 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" |
| 11 #include "platform/scroll/ScrollTypes.h" | 11 #include "platform/scroll/ScrollTypes.h" |
| 12 #include "public/platform/WebVector.h" | 12 #include "public/platform/WebVector.h" |
| 13 #include "public/platform/modules/permissions/WebPermissionType.h" | 13 #include "public/platform/modules/permissions/permission.mojom-blink.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class Frame; | 17 class Frame; |
| 18 | 18 |
| 19 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally | 19 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally |
| 20 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can | 20 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can |
| 21 // be kept (e.g., Frame::m_owner.) | 21 // be kept (e.g., Frame::m_owner.) |
| 22 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin { | 22 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin { |
| 23 public: | 23 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 42 // Returns the 'name' content attribute value of the browsing context | 42 // Returns the 'name' content attribute value of the browsing context |
| 43 // container. | 43 // container. |
| 44 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta
iner | 44 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta
iner |
| 45 virtual AtomicString browsingContextContainerName() const = 0; | 45 virtual AtomicString browsingContextContainerName() const = 0; |
| 46 virtual ScrollbarMode scrollingMode() const = 0; | 46 virtual ScrollbarMode scrollingMode() const = 0; |
| 47 virtual int marginWidth() const = 0; | 47 virtual int marginWidth() const = 0; |
| 48 virtual int marginHeight() const = 0; | 48 virtual int marginHeight() const = 0; |
| 49 virtual bool allowFullscreen() const = 0; | 49 virtual bool allowFullscreen() const = 0; |
| 50 virtual bool allowPaymentRequest() const = 0; | 50 virtual bool allowPaymentRequest() const = 0; |
| 51 virtual AtomicString csp() const = 0; | 51 virtual AtomicString csp() const = 0; |
| 52 virtual const WebVector<WebPermissionType>& delegatedPermissions() const = 0; | 52 virtual const WebVector<mojom::blink::PermissionName>& delegatedPermissions() |
| 53 const = 0; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 // TODO(dcheng): This class is an internal implementation detail of provisional | 56 // TODO(dcheng): This class is an internal implementation detail of provisional |
| 56 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies | 57 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies |
| 57 // on it. | 58 // on it. |
| 58 class CORE_EXPORT DummyFrameOwner | 59 class CORE_EXPORT DummyFrameOwner |
| 59 : public GarbageCollectedFinalized<DummyFrameOwner>, | 60 : public GarbageCollectedFinalized<DummyFrameOwner>, |
| 60 public FrameOwner { | 61 public FrameOwner { |
| 61 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); | 62 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); |
| 62 | 63 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 75 void renderFallbackContent() override {} | 76 void renderFallbackContent() override {} |
| 76 AtomicString browsingContextContainerName() const override { | 77 AtomicString browsingContextContainerName() const override { |
| 77 return AtomicString(); | 78 return AtomicString(); |
| 78 } | 79 } |
| 79 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } | 80 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } |
| 80 int marginWidth() const override { return -1; } | 81 int marginWidth() const override { return -1; } |
| 81 int marginHeight() const override { return -1; } | 82 int marginHeight() const override { return -1; } |
| 82 bool allowFullscreen() const override { return false; } | 83 bool allowFullscreen() const override { return false; } |
| 83 bool allowPaymentRequest() const override { return false; } | 84 bool allowPaymentRequest() const override { return false; } |
| 84 AtomicString csp() const override { return nullAtom; } | 85 AtomicString csp() const override { return nullAtom; } |
| 85 const WebVector<WebPermissionType>& delegatedPermissions() const override { | 86 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() |
| 86 DEFINE_STATIC_LOCAL(WebVector<WebPermissionType>, permissions, ()); | 87 const override { |
| 88 DEFINE_STATIC_LOCAL(WebVector<mojom::blink::PermissionName>, permissions, |
| 89 ()); |
| 87 return permissions; | 90 return permissions; |
| 88 } | 91 } |
| 89 | 92 |
| 90 private: | 93 private: |
| 91 // Intentionally private to prevent redundant checks when the type is | 94 // Intentionally private to prevent redundant checks when the type is |
| 92 // already DummyFrameOwner. | 95 // already DummyFrameOwner. |
| 93 bool isLocal() const override { return false; } | 96 bool isLocal() const override { return false; } |
| 94 bool isRemote() const override { return false; } | 97 bool isRemote() const override { return false; } |
| 95 }; | 98 }; |
| 96 | 99 |
| 97 } // namespace blink | 100 } // namespace blink |
| 98 | 101 |
| 99 #endif // FrameOwner_h | 102 #endif // FrameOwner_h |
| OLD | NEW |