Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / loader / HistoryItem.h
index d02c164..3530790 100644 (file)
@@ -28,6 +28,7 @@
 #define HistoryItem_h
 
 #include "bindings/v8/SerializedScriptValue.h"
+#include "platform/geometry/FloatPoint.h"
 #include "platform/geometry/IntPoint.h"
 #include "platform/weborigin/Referrer.h"
 #include "wtf/RefCounted.h"
@@ -36,6 +37,7 @@
 namespace WebCore {
 
 class Document;
+class DocumentState;
 class FormData;
 class HistoryItem;
 class Image;
@@ -47,14 +49,12 @@ typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
 class HistoryItem : public RefCounted<HistoryItem> {
 public:
     static PassRefPtr<HistoryItem> create() { return adoptRef(new HistoryItem); }
-
     ~HistoryItem();
 
-    PassRefPtr<HistoryItem> copy() const;
-
     // Used when the frame this item represents was navigated to a different
     // url but a new item wasn't created.
-    void generateNewSequenceNumbers();
+    void generateNewItemSequenceNumber();
+    void generateNewDocumentSequenceNumber();
 
     const String& urlString() const;
     KURL url() const;
@@ -65,6 +65,8 @@ public:
     FormData* formData();
     const AtomicString& formContentType() const;
 
+    const FloatPoint& pinchViewportScrollPoint() const;
+    void setPinchViewportScrollPoint(const FloatPoint&);
     const IntPoint& scrollPoint() const;
     void setScrollPoint(const IntPoint&);
     void clearScrollPoint();
@@ -72,8 +74,10 @@ public:
     float pageScaleFactor() const;
     void setPageScaleFactor(float);
 
-    const Vector<String>& documentState() const;
+    Vector<String> getReferencedFilePaths();
+    const Vector<String>& documentState();
     void setDocumentState(const Vector<String>&);
+    void setDocumentState(DocumentState*);
     void clearDocumentState();
 
     void setURL(const KURL&);
@@ -94,25 +98,20 @@ public:
     void setFormData(PassRefPtr<FormData>);
     void setFormContentType(const AtomicString&);
 
-    void addChildItem(PassRefPtr<HistoryItem>);
-    const HistoryItemVector& children() const;
-    void clearChildren();
-
     bool isCurrentDocument(Document*) const;
 
 private:
     HistoryItem();
-    explicit HistoryItem(const HistoryItem&);
 
     String m_urlString;
     Referrer m_referrer;
     String m_target;
 
+    FloatPoint m_pinchViewportScrollPoint;
     IntPoint m_scrollPoint;
     float m_pageScaleFactor;
-    Vector<String> m_documentState;
-
-    HistoryItemVector m_children;
+    Vector<String> m_documentStateVector;
+    RefPtrWillBePersistent<DocumentState> m_documentState;
 
     // If two HistoryItems have the same item sequence number, then they are
     // clones of one another. Traversing history from one such HistoryItem to