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 "public/web/WebRemoteFrame.h" | 8 #include "public/web/WebRemoteFrame.h" |
9 #include "web/RemoteFrameClient.h" | 9 #include "web/RemoteFrameClient.h" |
10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
11 #include "wtf/OwnPtr.h" | 11 #include "wtf/OwnPtr.h" |
12 #include "wtf/RefCounted.h" | 12 #include "wtf/RefCounted.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
| 15 |
15 class FrameHost; | 16 class FrameHost; |
16 class FrameOwner; | 17 class FrameOwner; |
17 class RemoteFrame; | 18 class RemoteFrame; |
18 } | |
19 | |
20 namespace blink { | |
21 | 19 |
22 class WebRemoteFrameImpl : public WebRemoteFrame, public RefCounted<WebRemoteFra
meImpl> { | 20 class WebRemoteFrameImpl : public WebRemoteFrame, public RefCounted<WebRemoteFra
meImpl> { |
23 public: | 21 public: |
24 WebRemoteFrameImpl(); | 22 WebRemoteFrameImpl(); |
25 virtual ~WebRemoteFrameImpl(); | 23 virtual ~WebRemoteFrameImpl(); |
26 | 24 |
27 // WebRemoteFrame methods. | 25 // WebRemoteFrame methods. |
28 virtual bool isWebLocalFrame() const OVERRIDE; | 26 virtual bool isWebLocalFrame() const OVERRIDE; |
29 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; | 27 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; |
30 virtual bool isWebRemoteFrame() const OVERRIDE; | 28 virtual bool isWebRemoteFrame() const OVERRIDE; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTex
tNormal) const OVERRIDE; | 168 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTex
tNormal) const OVERRIDE; |
171 virtual WebString markerTextForListItem(const WebElement&) const OVERRIDE; | 169 virtual WebString markerTextForListItem(const WebElement&) const OVERRIDE; |
172 virtual WebRect selectionBoundsRect() const OVERRIDE; | 170 virtual WebRect selectionBoundsRect() const OVERRIDE; |
173 | 171 |
174 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
OVERRIDE; | 172 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
OVERRIDE; |
175 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; | 173 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; |
176 | 174 |
177 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien
t*) OVERRIDE; | 175 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien
t*) OVERRIDE; |
178 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli
ent*) OVERRIDE; | 176 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli
ent*) OVERRIDE; |
179 | 177 |
180 void initializeWebCoreFrame(blink::FrameHost*, blink::FrameOwner*, const Ato
micString& name); | 178 void initializeWebCoreFrame(FrameHost*, FrameOwner*, const AtomicString& nam
e); |
181 | 179 |
182 void setWebCoreFrame(PassRefPtr<blink::RemoteFrame>); | 180 void setWebCoreFrame(PassRefPtr<RemoteFrame>); |
183 blink::RemoteFrame* frame() const { return m_frame.get(); } | 181 RemoteFrame* frame() const { return m_frame.get(); } |
184 | 182 |
185 static WebRemoteFrameImpl* fromFrame(blink::RemoteFrame&); | 183 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); |
186 | 184 |
187 private: | 185 private: |
188 RemoteFrameClient m_frameClient; | 186 RemoteFrameClient m_frameClient; |
189 RefPtr<blink::RemoteFrame> m_frame; | 187 RefPtr<RemoteFrame> m_frame; |
190 | 188 |
191 HashMap<WebFrame*, OwnPtr<blink::FrameOwner> > m_ownersForChildren; | 189 HashMap<WebFrame*, OwnPtr<FrameOwner> > m_ownersForChildren; |
192 }; | 190 }; |
193 | 191 |
194 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 192 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
195 | 193 |
196 } // namespace blink | 194 } // namespace blink |
197 | 195 |
198 #endif // WebRemoteFrameImpl_h | 196 #endif // WebRemoteFrameImpl_h |
OLD | NEW |