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

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

Issue 1125053002: Move renderFallbackContent() into FrameOwner interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "web/WebLocalFrameImpl.h" 9 #include "web/WebLocalFrameImpl.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // Helper class to bridge communication for a frame with a remote parent. 13 // Helper class to bridge communication for a frame with a remote parent.
14 // Currently, it serves two purposes: 14 // Currently, it serves two purposes:
15 // 1. Allows the local frame's loader to retrieve sandbox flags associated with 15 // 1. Allows the local frame's loader to retrieve sandbox flags associated with
16 // its owner element in another process. 16 // its owner element in another process.
17 // 2. Trigger a load event on its owner element once it finishes a load. 17 // 2. Trigger a load event on its owner element once it finishes a load.
18 class RemoteBridgeFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<Remo teBridgeFrameOwner>, public FrameOwner { 18 class RemoteBridgeFrameOwner final : public NoBaseWillBeGarbageCollectedFinalize d<RemoteBridgeFrameOwner>, public FrameOwner {
19 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner); 19 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner);
20 public: 20 public:
21 static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillB eRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags) 21 static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillB eRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags)
22 { 22 {
23 return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags)); 23 return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags));
24 } 24 }
25 25
26 virtual bool isLocal() const override 26 bool isLocal() const override
27 { 27 {
28 return false; 28 return false;
29 } 29 }
30 30
31 virtual SandboxFlags sandboxFlags() const override 31 SandboxFlags sandboxFlags() const override
32 { 32 {
33 return m_sandboxFlags; 33 return m_sandboxFlags;
34 } 34 }
35 35
36 void setSandboxFlags(SandboxFlags flags) 36 void setSandboxFlags(SandboxFlags flags)
37 { 37 {
38 m_sandboxFlags = flags; 38 m_sandboxFlags = flags;
39 } 39 }
40 40
41 void setContentFrame(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame) 41 void setContentFrame(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame)
42 { 42 {
43 m_frame = frame; 43 m_frame = frame;
44 } 44 }
45 45
46 virtual void dispatchLoad() override; 46 void dispatchLoad() override;
47
48 void renderFallbackContent() override
49 {
50 // TODO(dcheng): Implement.
51 }
47 52
48 DECLARE_VIRTUAL_TRACE(); 53 DECLARE_VIRTUAL_TRACE();
49 54
50 private: 55 private:
51 RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFla gs); 56 RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFla gs);
52 57
53 RefPtrWillBeMember<WebLocalFrameImpl> m_frame; 58 RefPtrWillBeMember<WebLocalFrameImpl> m_frame;
54 SandboxFlags m_sandboxFlags; 59 SandboxFlags m_sandboxFlags;
55 }; 60 };
56 61
57 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal()); 62 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal());
58 63
59 } // namespace blink 64 } // namespace blink
60 65
61 #endif // RemoteBridgeFrameOwner_h 66 #endif // RemoteBridgeFrameOwner_h
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698