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