| 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" |
| 13 #include "public/platform/modules/permissions/WebPermissionType.h" |
| 12 | 14 |
| 13 namespace blink { | 15 namespace blink { |
| 14 | 16 |
| 15 class Frame; | 17 class Frame; |
| 16 | 18 |
| 17 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally | 19 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally |
| 18 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can | 20 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can |
| 19 // be kept (e.g., Frame::m_owner.) | 21 // be kept (e.g., Frame::m_owner.) |
| 20 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin { | 22 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin { |
| 21 public: | 23 public: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 virtual void dispatchLoad() = 0; | 34 virtual void dispatchLoad() = 0; |
| 33 | 35 |
| 34 // On load failure, a frame can ask its owner to render fallback content | 36 // On load failure, a frame can ask its owner to render fallback content |
| 35 // which replaces the frame contents. | 37 // which replaces the frame contents. |
| 36 virtual void renderFallbackContent() = 0; | 38 virtual void renderFallbackContent() = 0; |
| 37 | 39 |
| 38 virtual ScrollbarMode scrollingMode() const = 0; | 40 virtual ScrollbarMode scrollingMode() const = 0; |
| 39 virtual int marginWidth() const = 0; | 41 virtual int marginWidth() const = 0; |
| 40 virtual int marginHeight() const = 0; | 42 virtual int marginHeight() const = 0; |
| 41 virtual bool allowFullscreen() const = 0; | 43 virtual bool allowFullscreen() const = 0; |
| 44 virtual const WebVector<WebPermissionType>* delegatedPermissions() const = 0
; |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 class CORE_EXPORT DummyFrameOwner : public GarbageCollectedFinalized<DummyFrameO
wner>, public FrameOwner { | 47 class CORE_EXPORT DummyFrameOwner : public GarbageCollectedFinalized<DummyFrameO
wner>, public FrameOwner { |
| 45 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); | 48 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); |
| 46 public: | 49 public: |
| 47 static DummyFrameOwner* create() | 50 static DummyFrameOwner* create() |
| 48 { | 51 { |
| 49 return new DummyFrameOwner; | 52 return new DummyFrameOwner; |
| 50 } | 53 } |
| 51 | 54 |
| 52 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } | 55 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } |
| 53 | 56 |
| 54 // FrameOwner overrides: | 57 // FrameOwner overrides: |
| 55 bool isLocal() const override { return false; } | 58 bool isLocal() const override { return false; } |
| 56 bool isRemote() const override { return false; } | 59 bool isRemote() const override { return false; } |
| 57 void setContentFrame(Frame&) override { } | 60 void setContentFrame(Frame&) override { } |
| 58 void clearContentFrame() override { } | 61 void clearContentFrame() override { } |
| 59 SandboxFlags getSandboxFlags() const override { return SandboxNone; } | 62 SandboxFlags getSandboxFlags() const override { return SandboxNone; } |
| 60 void dispatchLoad() override { } | 63 void dispatchLoad() override { } |
| 61 void renderFallbackContent() override { } | 64 void renderFallbackContent() override { } |
| 62 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } | 65 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } |
| 63 int marginWidth() const override { return -1; } | 66 int marginWidth() const override { return -1; } |
| 64 int marginHeight() const override { return -1; } | 67 int marginHeight() const override { return -1; } |
| 65 bool allowFullscreen() const override { return false; } | 68 bool allowFullscreen() const override { return false; } |
| 69 const WebVector<WebPermissionType>* delegatedPermissions() const override {
return nullptr; } |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 } // namespace blink | 72 } // namespace blink |
| 69 | 73 |
| 70 #endif // FrameOwner_h | 74 #endif // FrameOwner_h |
| OLD | NEW |