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 "public/web/WebRemoteFrameClient.h" | 9 #include "public/web/WebRemoteFrameClient.h" |
10 #include "web/RemoteFrameClient.h" | 10 #include "web/RemoteFrameClient.h" |
11 #include "wtf/HashMap.h" | 11 #include "wtf/HashMap.h" |
12 #include "wtf/OwnPtr.h" | 12 #include "wtf/OwnPtr.h" |
13 #include "wtf/RefCounted.h" | 13 #include "wtf/RefCounted.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class FrameHost; | 17 class FrameHost; |
18 class FrameOwner; | 18 class FrameOwner; |
19 class RemoteFrame; | 19 class RemoteFrame; |
| 20 class WebViewImpl; |
20 | 21 |
21 class WebRemoteFrameImpl : public WebRemoteFrame, public RefCounted<WebRemoteFra
meImpl> { | 22 class WebRemoteFrameImpl FINAL : public RefCountedWillBeGarbageCollectedFinalize
d<WebRemoteFrameImpl>, public WebRemoteFrame { |
22 public: | 23 public: |
23 WebRemoteFrameImpl(WebRemoteFrameClient*); | 24 WebRemoteFrameImpl(WebRemoteFrameClient*); |
24 virtual ~WebRemoteFrameImpl(); | 25 virtual ~WebRemoteFrameImpl(); |
25 | 26 |
26 // WebRemoteFrame methods. | 27 // WebRemoteFrame methods. |
27 virtual bool isWebLocalFrame() const OVERRIDE; | 28 virtual bool isWebLocalFrame() const OVERRIDE; |
28 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; | 29 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; |
29 virtual bool isWebRemoteFrame() const OVERRIDE; | 30 virtual bool isWebRemoteFrame() const OVERRIDE; |
30 virtual WebRemoteFrame* toWebRemoteFrame() OVERRIDE; | 31 virtual WebRemoteFrame* toWebRemoteFrame() OVERRIDE; |
31 virtual void close() OVERRIDE; | 32 virtual void close() OVERRIDE; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 virtual WebRect selectionBoundsRect() const OVERRIDE; | 172 virtual WebRect selectionBoundsRect() const OVERRIDE; |
172 | 173 |
173 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
OVERRIDE; | 174 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
OVERRIDE; |
174 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; | 175 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; |
175 | 176 |
176 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien
t*) OVERRIDE; | 177 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien
t*) OVERRIDE; |
177 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebRemoteFr
ameClient*) OVERRIDE; | 178 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebRemoteFr
ameClient*) OVERRIDE; |
178 | 179 |
179 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); | 180 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); |
180 | 181 |
181 void setCoreFrame(PassRefPtr<RemoteFrame>); | 182 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); |
182 RemoteFrame* frame() const { return m_frame.get(); } | 183 RemoteFrame* frame() const { return m_frame.get(); } |
183 | 184 |
184 WebRemoteFrameClient* client() const { return m_client; } | 185 WebRemoteFrameClient* client() const { return m_client; } |
185 | 186 |
186 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); | 187 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); |
187 | 188 |
| 189 virtual void trace(Visitor*); |
| 190 |
188 private: | 191 private: |
189 RemoteFrameClient m_frameClient; | 192 RemoteFrameClient m_frameClient; |
190 RefPtr<RemoteFrame> m_frame; | 193 RefPtrWillBeMember<RemoteFrame> m_frame; |
191 WebRemoteFrameClient* m_client; | 194 WebRemoteFrameClient* m_client; |
192 | 195 |
193 HashMap<WebFrame*, OwnPtr<FrameOwner> > m_ownersForChildren; | 196 WebViewImpl* viewImpl() const; |
| 197 |
| 198 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi
ldren; |
194 }; | 199 }; |
195 | 200 |
196 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 201 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
197 | 202 |
198 } // namespace blink | 203 } // namespace blink |
199 | 204 |
200 #endif // WebRemoteFrameImpl_h | 205 #endif // WebRemoteFrameImpl_h |
OLD | NEW |