| 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" |
| 11 #include "wtf/OwnPtr.h" |
| 10 #include "wtf/RefCounted.h" | 12 #include "wtf/RefCounted.h" |
| 11 | 13 |
| 12 namespace WebCore { class RemoteFrame; } | 14 namespace WebCore { |
| 15 class FrameOwner; |
| 16 class Page; |
| 17 class RemoteFrame; |
| 18 } |
| 13 | 19 |
| 14 namespace blink { | 20 namespace blink { |
| 15 | 21 |
| 16 class WebRemoteFrameImpl : public WebRemoteFrame, public RefCounted<WebRemoteFra
meImpl> { | 22 class WebRemoteFrameImpl : public WebRemoteFrame, public RefCounted<WebRemoteFra
meImpl> { |
| 17 public: | 23 public: |
| 18 WebRemoteFrameImpl(); | 24 WebRemoteFrameImpl(); |
| 19 virtual ~WebRemoteFrameImpl(); | 25 virtual ~WebRemoteFrameImpl(); |
| 20 | 26 |
| 21 // WebRemoteFrame methods. | 27 // WebRemoteFrame methods. |
| 22 virtual bool isWebLocalFrame() const OVERRIDE; | 28 virtual bool isWebLocalFrame() const OVERRIDE; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 36 virtual WebSize scrollOffset() const OVERRIDE; | 42 virtual WebSize scrollOffset() const OVERRIDE; |
| 37 virtual void setScrollOffset(const WebSize&) OVERRIDE; | 43 virtual void setScrollOffset(const WebSize&) OVERRIDE; |
| 38 virtual WebSize minimumScrollOffset() const OVERRIDE; | 44 virtual WebSize minimumScrollOffset() const OVERRIDE; |
| 39 virtual WebSize maximumScrollOffset() const OVERRIDE; | 45 virtual WebSize maximumScrollOffset() const OVERRIDE; |
| 40 virtual WebSize contentsSize() const OVERRIDE; | 46 virtual WebSize contentsSize() const OVERRIDE; |
| 41 virtual bool hasVisibleContent() const OVERRIDE; | 47 virtual bool hasVisibleContent() const OVERRIDE; |
| 42 virtual WebRect visibleContentRect() const OVERRIDE; | 48 virtual WebRect visibleContentRect() const OVERRIDE; |
| 43 virtual bool hasHorizontalScrollbar() const OVERRIDE; | 49 virtual bool hasHorizontalScrollbar() const OVERRIDE; |
| 44 virtual bool hasVerticalScrollbar() const OVERRIDE; | 50 virtual bool hasVerticalScrollbar() const OVERRIDE; |
| 45 virtual WebView* view() const OVERRIDE; | 51 virtual WebView* view() const OVERRIDE; |
| 52 virtual void removeChild(WebFrame*) OVERRIDE; |
| 46 virtual WebFrame* traversePrevious(bool wrap) const OVERRIDE; | 53 virtual WebFrame* traversePrevious(bool wrap) const OVERRIDE; |
| 47 virtual WebFrame* traverseNext(bool wrap) const OVERRIDE; | 54 virtual WebFrame* traverseNext(bool wrap) const OVERRIDE; |
| 48 virtual WebFrame* findChildByName(const WebString&) const OVERRIDE; | 55 virtual WebFrame* findChildByName(const WebString&) const OVERRIDE; |
| 49 virtual WebDocument document() const OVERRIDE; | 56 virtual WebDocument document() const OVERRIDE; |
| 50 virtual WebPerformance performance() const OVERRIDE; | 57 virtual WebPerformance performance() const OVERRIDE; |
| 51 virtual bool dispatchBeforeUnloadEvent() OVERRIDE; | 58 virtual bool dispatchBeforeUnloadEvent() OVERRIDE; |
| 52 virtual void dispatchUnloadEvent() OVERRIDE; | 59 virtual void dispatchUnloadEvent() OVERRIDE; |
| 53 virtual NPObject* windowObject() const OVERRIDE; | 60 virtual NPObject* windowObject() const OVERRIDE; |
| 54 virtual void bindToWindowObject(const WebString& name, NPObject*) OVERRIDE; | 61 virtual void bindToWindowObject(const WebString& name, NPObject*) OVERRIDE; |
| 55 virtual void bindToWindowObject(const WebString& name, NPObject*, void*) OVE
RRIDE; | 62 virtual void bindToWindowObject(const WebString& name, NPObject*, void*) OVE
RRIDE; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 170 |
| 164 virtual WebString contentAsText(size_t maxChars) const OVERRIDE; | 171 virtual WebString contentAsText(size_t maxChars) const OVERRIDE; |
| 165 virtual WebString contentAsMarkup() const OVERRIDE; | 172 virtual WebString contentAsMarkup() const OVERRIDE; |
| 166 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTex
tNormal) const OVERRIDE; | 173 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTex
tNormal) const OVERRIDE; |
| 167 virtual WebString markerTextForListItem(const WebElement&) const OVERRIDE; | 174 virtual WebString markerTextForListItem(const WebElement&) const OVERRIDE; |
| 168 virtual WebRect selectionBoundsRect() const OVERRIDE; | 175 virtual WebRect selectionBoundsRect() const OVERRIDE; |
| 169 | 176 |
| 170 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
OVERRIDE; | 177 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
OVERRIDE; |
| 171 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; | 178 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; |
| 172 | 179 |
| 180 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien
t*) OVERRIDE; |
| 181 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli
ent*) OVERRIDE; |
| 182 |
| 183 void initializeAsMainFrame(WebCore::Page*); |
| 184 |
| 185 void setWebCoreFrame(PassRefPtr<WebCore::RemoteFrame>); |
| 173 WebCore::RemoteFrame* frame() const { return m_frame.get(); } | 186 WebCore::RemoteFrame* frame() const { return m_frame.get(); } |
| 174 | 187 |
| 175 private: | 188 private: |
| 176 RemoteFrameClient m_frameClient; | 189 RemoteFrameClient m_frameClient; |
| 177 RefPtr<WebCore::RemoteFrame> m_frame; | 190 RefPtr<WebCore::RemoteFrame> m_frame; |
| 191 |
| 192 HashMap<WebFrame*, OwnPtr<WebCore::FrameOwner> > m_ownersForChildren; |
| 178 }; | 193 }; |
| 179 | 194 |
| 180 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 195 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
| 181 | 196 |
| 182 | |
| 183 } // namespace blink | 197 } // namespace blink |
| 184 | 198 |
| 185 #endif // WebRemoteFrameImpl_h | 199 #endif // WebRemoteFrameImpl_h |
| OLD | NEW |