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 WebRemoteFrameImpl_h | 5 #ifndef WebRemoteFrameImpl_h |
6 #define WebRemoteFrameImpl_h | 6 #define WebRemoteFrameImpl_h |
7 | 7 |
| 8 #include "core/frame/FrameOwner.h" |
8 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
9 #include "public/web/WebRemoteFrame.h" | 10 #include "public/web/WebRemoteFrame.h" |
10 #include "public/web/WebRemoteFrameClient.h" | 11 #include "public/web/WebRemoteFrameClient.h" |
11 #include "web/RemoteFrameClientImpl.h" | 12 #include "web/RemoteFrameClientImpl.h" |
12 #include "wtf/HashMap.h" | 13 #include "wtf/HashMap.h" |
13 #include "wtf/OwnPtr.h" | 14 #include "wtf/OwnPtr.h" |
14 #include "wtf/RefCounted.h" | 15 #include "wtf/RefCounted.h" |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 | 18 |
18 class FrameHost; | 19 class FrameHost; |
19 class FrameOwner; | 20 class FrameOwner; |
20 class RemoteFrame; | 21 class RemoteFrame; |
21 class WebViewImpl; | 22 class WebViewImpl; |
22 | 23 |
| 24 // FIXME: This is just a placeholder frame owner to supply to RemoteFrame when |
| 25 // the parent is also a remote frame. Strictly speaking, this shouldn't be |
| 26 // necessary, since a remote frame shouldn't ever need to communicate with a |
| 27 // remote parent (there are no sandbox flags to retrieve in this case, nor can |
| 28 // the RemoteFrame itself load a document). In most circumstances, the check for |
| 29 // frame->owner() can be replaced with a check for frame->tree().parent(). Once |
| 30 // that's done, this class can be removed. |
| 31 class PlaceholderFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<Place
holderFrameOwner>, public FrameOwner { |
| 32 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PlaceholderFrameOwner); |
| 33 public: |
| 34 virtual bool isLocal() const override; |
| 35 virtual SandboxFlags sandboxFlags() const override; |
| 36 virtual void dispatchLoad() override; |
| 37 }; |
| 38 |
23 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize
d<WebRemoteFrameImpl>, public WebRemoteFrame { | 39 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize
d<WebRemoteFrameImpl>, public WebRemoteFrame { |
24 public: | 40 public: |
25 explicit WebRemoteFrameImpl(WebRemoteFrameClient*); | 41 explicit WebRemoteFrameImpl(WebRemoteFrameClient*); |
26 virtual ~WebRemoteFrameImpl(); | 42 virtual ~WebRemoteFrameImpl(); |
27 | 43 |
28 // WebRemoteFrame methods. | 44 // WebRemoteFrame methods. |
29 virtual bool isWebLocalFrame() const override; | 45 virtual bool isWebLocalFrame() const override; |
30 virtual WebLocalFrame* toWebLocalFrame() override; | 46 virtual WebLocalFrame* toWebLocalFrame() override; |
31 virtual bool isWebRemoteFrame() const override; | 47 virtual bool isWebRemoteFrame() const override; |
32 virtual WebRemoteFrame* toWebRemoteFrame() override; | 48 virtual WebRemoteFrame* toWebRemoteFrame() override; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 GC_PLUGIN_IGNORE("340522") | 221 GC_PLUGIN_IGNORE("340522") |
206 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; | 222 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; |
207 #endif | 223 #endif |
208 }; | 224 }; |
209 | 225 |
210 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 226 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
211 | 227 |
212 } // namespace blink | 228 } // namespace blink |
213 | 229 |
214 #endif // WebRemoteFrameImpl_h | 230 #endif // WebRemoteFrameImpl_h |
OLD | NEW |