Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameOwner.h

Issue 1854543002: Oilpan: Remove WillBe types (part 7) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12
13 namespace blink { 13 namespace blink {
14 14
15 class Frame; 15 class Frame;
16 16
17 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally 17 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally
18 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can 18 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can
19 // be kept (e.g., Frame::m_owner.) 19 // be kept (e.g., Frame::m_owner.)
20 class CORE_EXPORT FrameOwner : public WillBeGarbageCollectedMixin { 20 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin {
21 public: 21 public:
22 virtual ~FrameOwner() { } 22 virtual ~FrameOwner() { }
23 DEFINE_INLINE_VIRTUAL_TRACE() { } 23 DEFINE_INLINE_VIRTUAL_TRACE() { }
24 24
25 virtual bool isLocal() const = 0; 25 virtual bool isLocal() const = 0;
26 virtual bool isRemote() const = 0; 26 virtual bool isRemote() const = 0;
27 27
28 virtual void setContentFrame(Frame&) = 0; 28 virtual void setContentFrame(Frame&) = 0;
29 virtual void clearContentFrame() = 0; 29 virtual void clearContentFrame() = 0;
30 30
31 virtual SandboxFlags getSandboxFlags() const = 0; 31 virtual SandboxFlags getSandboxFlags() const = 0;
32 virtual void dispatchLoad() = 0; 32 virtual void dispatchLoad() = 0;
33 33
34 // On load failure, a frame can ask its owner to render fallback content 34 // On load failure, a frame can ask its owner to render fallback content
35 // which replaces the frame contents. 35 // which replaces the frame contents.
36 virtual void renderFallbackContent() = 0; 36 virtual void renderFallbackContent() = 0;
37 37
38 virtual ScrollbarMode scrollingMode() const = 0; 38 virtual ScrollbarMode scrollingMode() const = 0;
39 virtual int marginWidth() const = 0; 39 virtual int marginWidth() const = 0;
40 virtual int marginHeight() const = 0; 40 virtual int marginHeight() const = 0;
41 }; 41 };
42 42
43 class CORE_EXPORT DummyFrameOwner : public NoBaseWillBeGarbageCollectedFinalized <DummyFrameOwner>, public FrameOwner { 43 class CORE_EXPORT DummyFrameOwner : public GarbageCollectedFinalized<DummyFrameO wner>, public FrameOwner {
44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); 44 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner);
45 public: 45 public:
46 static PassOwnPtrWillBeRawPtr<DummyFrameOwner> create() 46 static RawPtr<DummyFrameOwner> create()
47 { 47 {
48 return adoptPtrWillBeNoop(new DummyFrameOwner); 48 return adoptPtrWillBeNoop(new DummyFrameOwner);
49 } 49 }
50 50
51 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } 51 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); }
52 52
53 // FrameOwner overrides: 53 // FrameOwner overrides:
54 bool isLocal() const override { return false; } 54 bool isLocal() const override { return false; }
55 bool isRemote() const override { return false; } 55 bool isRemote() const override { return false; }
56 void setContentFrame(Frame&) override { } 56 void setContentFrame(Frame&) override { }
57 void clearContentFrame() override { } 57 void clearContentFrame() override { }
58 SandboxFlags getSandboxFlags() const override { return SandboxNone; } 58 SandboxFlags getSandboxFlags() const override { return SandboxNone; }
59 void dispatchLoad() override { } 59 void dispatchLoad() override { }
60 void renderFallbackContent() override { } 60 void renderFallbackContent() override { }
61 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } 61 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
62 int marginWidth() const override { return -1; } 62 int marginWidth() const override { return -1; }
63 int marginHeight() const override { return -1; } 63 int marginHeight() const override { return -1; }
64 }; 64 };
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 #endif // FrameOwner_h 68 #endif // FrameOwner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.cpp ('k') | third_party/WebKit/Source/core/frame/FrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698