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 "core/frame/FrameOwner.h" |
9 #include "platform/heap/Handle.h" | 9 #include "core/frame/RemoteFrame.h" |
10 #include "public/web/WebRemoteFrame.h" | 10 #include "public/web/WebRemoteFrame.h" |
11 #include "public/web/WebRemoteFrameClient.h" | 11 #include "public/web/WebRemoteFrameClient.h" |
12 #include "web/RemoteFrameClientImpl.h" | 12 #include "web/RemoteFrameClientImpl.h" |
| 13 #include "web/WebFrameImplBase.h" |
13 #include "wtf/HashMap.h" | 14 #include "wtf/HashMap.h" |
14 #include "wtf/OwnPtr.h" | 15 #include "wtf/OwnPtr.h" |
15 #include "wtf/RefCounted.h" | 16 #include "wtf/RefCounted.h" |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
18 | 19 |
19 class FrameHost; | 20 class FrameHost; |
20 class FrameOwner; | 21 class FrameOwner; |
21 class RemoteFrame; | 22 class RemoteFrame; |
22 | 23 |
23 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize
d<WebRemoteFrameImpl>, public WebRemoteFrame { | 24 class WebRemoteFrameImpl final : public WebFrameImplBase, public WebRemoteFrame
{ |
24 public: | 25 public: |
25 static WebRemoteFrame* create(WebTreeScopeType, WebRemoteFrameClient*); | 26 static WebRemoteFrameImpl* create(WebTreeScopeType, WebRemoteFrameClient*); |
26 ~WebRemoteFrameImpl() override; | 27 ~WebRemoteFrameImpl() override; |
27 | 28 |
28 // WebRemoteFrame methods. | 29 // WebFrame methods: |
29 bool isWebLocalFrame() const override; | 30 bool isWebLocalFrame() const override; |
30 WebLocalFrame* toWebLocalFrame() override; | 31 WebLocalFrame* toWebLocalFrame() override; |
31 bool isWebRemoteFrame() const override; | 32 bool isWebRemoteFrame() const override; |
32 WebRemoteFrame* toWebRemoteFrame() override; | 33 WebRemoteFrame* toWebRemoteFrame() override; |
33 void close() override; | 34 void close() override; |
34 WebString uniqueName() const override; | 35 WebString uniqueName() const override; |
35 WebString assignedName() const override; | 36 WebString assignedName() const override; |
36 void setName(const WebString&) override; | 37 void setName(const WebString&) override; |
37 WebVector<WebIconURL> iconURLs(int iconTypesMask) const override; | 38 WebVector<WebIconURL> iconURLs(int iconTypesMask) const override; |
38 void setRemoteWebLayer(WebLayer*) override; | 39 void setRemoteWebLayer(WebLayer*) override; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 159 |
159 WebString contentAsText(size_t maxChars) const override; | 160 WebString contentAsText(size_t maxChars) const override; |
160 WebString contentAsMarkup() const override; | 161 WebString contentAsMarkup() const override; |
161 WebString layoutTreeAsText(LayoutAsTextControls toShow = LayoutAsTextNormal)
const override; | 162 WebString layoutTreeAsText(LayoutAsTextControls toShow = LayoutAsTextNormal)
const override; |
162 WebString markerTextForListItem(const WebElement&) const override; | 163 WebString markerTextForListItem(const WebElement&) const override; |
163 WebRect selectionBoundsRect() const override; | 164 WebRect selectionBoundsRect() const override; |
164 | 165 |
165 bool selectionStartHasSpellingMarkerFor(int from, int length) const override
; | 166 bool selectionStartHasSpellingMarkerFor(int from, int length) const override
; |
166 WebString layerTreeAsText(bool showDebugInfo = false) const override; | 167 WebString layerTreeAsText(bool showDebugInfo = false) const override; |
167 | 168 |
168 WebLocalFrame* createLocalChild(WebTreeScopeType, const WebString& name, Web
SandboxFlags, WebFrameClient*, WebFrame* previousSibling, const WebFrameOwnerPro
perties&) override; | 169 WebFrameImplBase* toImplBase() { return this; } |
169 WebRemoteFrame* createRemoteChild(WebTreeScopeType, const WebString& name, W
ebSandboxFlags, WebRemoteFrameClient*) override; | |
170 | 170 |
171 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); | 171 // WebFrameImplBase methods: |
| 172 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name,
const AtomicString& fallbackName) override; |
| 173 RemoteFrame* frame() const override { return m_frame.get(); } |
172 | 174 |
173 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); | 175 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); |
174 RemoteFrame* frame() const { return m_frame.get(); } | |
175 | 176 |
176 WebRemoteFrameClient* client() const { return m_client; } | 177 WebRemoteFrameClient* client() const { return m_client; } |
177 | 178 |
178 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); | 179 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); |
179 | 180 |
| 181 // WebRemoteFrame methods: |
| 182 WebLocalFrame* createLocalChild(WebTreeScopeType, const WebString& name, Web
SandboxFlags, WebFrameClient*, WebFrame* previousSibling, const WebFrameOwnerPro
perties&) override; |
| 183 WebRemoteFrame* createRemoteChild(WebTreeScopeType, const WebString& name, W
ebSandboxFlags, WebRemoteFrameClient*) override; |
| 184 |
180 void initializeFromFrame(WebLocalFrame*) const override; | 185 void initializeFromFrame(WebLocalFrame*) const override; |
181 | 186 |
182 void setReplicatedOrigin(const WebSecurityOrigin&) const override; | 187 void setReplicatedOrigin(const WebSecurityOrigin&) const override; |
183 void setReplicatedSandboxFlags(WebSandboxFlags) const override; | 188 void setReplicatedSandboxFlags(WebSandboxFlags) const override; |
184 void setReplicatedName(const WebString&) const override; | 189 void setReplicatedName(const WebString&) const override; |
185 void DispatchLoadEventForFrameOwner() const override; | 190 void DispatchLoadEventForFrameOwner() const override; |
186 | 191 |
187 void didStartLoading() override; | 192 void didStartLoading() override; |
188 void didStopLoading() override; | 193 void didStopLoading() override; |
189 | 194 |
(...skipping 16 matching lines...) Expand all Loading... |
206 // cleared upon close(). | 211 // cleared upon close(). |
207 SelfKeepAlive<WebRemoteFrameImpl> m_selfKeepAlive; | 212 SelfKeepAlive<WebRemoteFrameImpl> m_selfKeepAlive; |
208 #endif | 213 #endif |
209 }; | 214 }; |
210 | 215 |
211 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 216 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
212 | 217 |
213 } // namespace blink | 218 } // namespace blink |
214 | 219 |
215 #endif // WebRemoteFrameImpl_h | 220 #endif // WebRemoteFrameImpl_h |
OLD | NEW |