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

Side by Side Diff: third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 RemoteBridgeFrameOwner_h 5 #ifndef RemoteBridgeFrameOwner_h
6 #define RemoteBridgeFrameOwner_h 6 #define RemoteBridgeFrameOwner_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"
11 #include "web/WebLocalFrameImpl.h" 11 #include "web/WebLocalFrameImpl.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 // Helper class to bridge communication for a frame with a remote parent. 15 // Helper class to bridge communication for a frame with a remote parent.
16 // Currently, it serves two purposes: 16 // Currently, it serves two purposes:
17 // 1. Allows the local frame's loader to retrieve sandbox flags associated with 17 // 1. Allows the local frame's loader to retrieve sandbox flags associated with
18 // its owner element in another process. 18 // its owner element in another process.
19 // 2. Trigger a load event on its owner element once it finishes a load. 19 // 2. Trigger a load event on its owner element once it finishes a load.
20 class RemoteBridgeFrameOwner final : public NoBaseWillBeGarbageCollectedFinalize d<RemoteBridgeFrameOwner>, public FrameOwner { 20 class RemoteBridgeFrameOwner final : public GarbageCollectedFinalized<RemoteBrid geFrameOwner>, public FrameOwner {
21 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner); 21 USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner);
22 public: 22 public:
23 static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillB eRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags, const WebFrameOwnerPropert ies& frameOwnerProperties) 23 static RawPtr<RemoteBridgeFrameOwner> create(RawPtr<WebLocalFrameImpl> frame , SandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
24 { 24 {
25 return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags, frame OwnerProperties)); 25 return (new RemoteBridgeFrameOwner(frame, flags, frameOwnerProperties));
26 } 26 }
27 27
28 bool isLocal() const override 28 bool isLocal() const override
29 { 29 {
30 return false; 30 return false;
31 } 31 }
32 32
33 SandboxFlags sandboxFlags() const override 33 SandboxFlags sandboxFlags() const override
34 { 34 {
35 return m_sandboxFlags; 35 return m_sandboxFlags;
36 } 36 }
37 37
38 void setSandboxFlags(SandboxFlags flags) 38 void setSandboxFlags(SandboxFlags flags)
39 { 39 {
40 m_sandboxFlags = flags; 40 m_sandboxFlags = flags;
41 } 41 }
42 42
43 void setContentFrame(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame) 43 void setContentFrame(RawPtr<WebLocalFrameImpl> frame)
44 { 44 {
45 m_frame = frame; 45 m_frame = frame;
46 } 46 }
47 47
48 void dispatchLoad() override; 48 void dispatchLoad() override;
49 49
50 void renderFallbackContent() override 50 void renderFallbackContent() override
51 { 51 {
52 // TODO(dcheng): Implement. 52 // TODO(dcheng): Implement.
53 } 53 }
54 54
55 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); 55 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode);
56 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } 56 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; }
57 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } 57 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; }
58 58
59 ScrollbarMode scrollingMode() const override { return m_scrolling; } 59 ScrollbarMode scrollingMode() const override { return m_scrolling; }
60 int marginWidth() const override { return m_marginWidth; } 60 int marginWidth() const override { return m_marginWidth; }
61 int marginHeight() const override { return m_marginHeight; } 61 int marginHeight() const override { return m_marginHeight; }
62 62
63 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
64 64
65 private: 65 private:
66 RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFla gs, const WebFrameOwnerProperties&); 66 RemoteBridgeFrameOwner(RawPtr<WebLocalFrameImpl>, SandboxFlags, const WebFra meOwnerProperties&);
67 67
68 RefPtrWillBeMember<WebLocalFrameImpl> m_frame; 68 Member<WebLocalFrameImpl> m_frame;
69 SandboxFlags m_sandboxFlags; 69 SandboxFlags m_sandboxFlags;
70 ScrollbarMode m_scrolling; 70 ScrollbarMode m_scrolling;
71 int m_marginWidth; 71 int m_marginWidth;
72 int m_marginHeight; 72 int m_marginHeight;
73 }; 73 };
74 74
75 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal()); 75 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal());
76 76
77 } // namespace blink 77 } // namespace blink
78 78
79 #endif // RemoteBridgeFrameOwner_h 79 #endif // RemoteBridgeFrameOwner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698