OLD | NEW |
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 final : public NoBaseWillBeGarbageCollectedFinalize
d<RemoteBridgeFrameOwner>, 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 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(RemoteBridgeFrameOwner); |
20 public: | 21 public: |
21 static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillB
eRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags) | 22 static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillB
eRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags) |
22 { | 23 { |
23 return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags)); | 24 return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags)); |
24 } | 25 } |
25 | 26 |
26 bool isLocal() const override | 27 bool isLocal() const override |
27 { | 28 { |
28 return false; | 29 return false; |
29 } | 30 } |
(...skipping 27 matching lines...) Expand all Loading... |
57 | 58 |
58 RefPtrWillBeMember<WebLocalFrameImpl> m_frame; | 59 RefPtrWillBeMember<WebLocalFrameImpl> m_frame; |
59 SandboxFlags m_sandboxFlags; | 60 SandboxFlags m_sandboxFlags; |
60 }; | 61 }; |
61 | 62 |
62 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(),
!owner.isLocal()); | 63 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(),
!owner.isLocal()); |
63 | 64 |
64 } // namespace blink | 65 } // namespace blink |
65 | 66 |
66 #endif // RemoteBridgeFrameOwner_h | 67 #endif // RemoteBridgeFrameOwner_h |
OLD | NEW |