diff options
Diffstat (limited to 'WebCore/history/CachedFrame.h')
-rw-r--r-- | WebCore/history/CachedFrame.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/WebCore/history/CachedFrame.h b/WebCore/history/CachedFrame.h index c7beb15..83c3c3c 100644 --- a/WebCore/history/CachedFrame.h +++ b/WebCore/history/CachedFrame.h @@ -28,10 +28,11 @@ #include "KURL.h" #include "ScriptCachedFrameData.h" -#include <wtf/Noncopyable.h> +#include <wtf/RefPtr.h> namespace WebCore { + class CachedFrame; class CachedFramePlatformData; class DOMWindow; class Document; @@ -40,32 +41,38 @@ namespace WebCore { class FrameView; class Node; -class CachedFrame : public Noncopyable { +typedef Vector<RefPtr<CachedFrame> > CachedFrameVector; + +class CachedFrame : public RefCounted<CachedFrame> { public: - CachedFrame(Frame*); + static PassRefPtr<CachedFrame> create(Frame* frame) { return adoptRef(new CachedFrame(frame)); } ~CachedFrame(); - void restore(Frame*); + void restore(); void clear(); Document* document() const { return m_document.get(); } DocumentLoader* documentLoader() const { return m_documentLoader.get(); } FrameView* view() const { return m_view.get(); } Node* mousePressNode() const { return m_mousePressNode.get(); } - const KURL& url() const { return m_URL; } - DOMWindow* domWindow() const { return m_cachedFrameScriptData.domWindow(); } + const KURL& url() const { return m_url; } + DOMWindow* domWindow() const { return m_cachedFrameScriptData->domWindow(); } void setCachedFramePlatformData(CachedFramePlatformData*); CachedFramePlatformData* cachedFramePlatformData(); private: + CachedFrame(Frame*); + RefPtr<Document> m_document; RefPtr<DocumentLoader> m_documentLoader; RefPtr<FrameView> m_view; RefPtr<Node> m_mousePressNode; - KURL m_URL; - ScriptCachedFrameData m_cachedFrameScriptData; + KURL m_url; + OwnPtr<ScriptCachedFrameData> m_cachedFrameScriptData; OwnPtr<CachedFramePlatformData> m_cachedFramePlatformData; + + CachedFrameVector m_childFrames; }; } // namespace WebCore |