#ifndef HistoryItem_h
#define HistoryItem_h
#include "bindings/v8/SerializedScriptValue.h"
#include "platform/geometry/IntPoint.h"
#include "platform/weborigin/Referrer.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
class Document;
class FormData;
class HistoryItem;
class Image;
class KURL;
class ResourceRequest;
typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
class HistoryItem : public RefCounted<HistoryItem> {
public:
static PassRefPtr<HistoryItem> create() { return adoptRef(new HistoryItem); }
~HistoryItem();
void generateNewSequenceNumbers();
const String& urlString() const;
KURL url() const;
const Referrer& referrer() const;
const String& target() const;
FormData* formData();
const AtomicString& formContentType() const;
const IntPoint& scrollPoint() const;
void setScrollPoint(const IntPoint&);
void clearScrollPoint();
float pageScaleFactor() const;
void setPageScaleFactor(float);
const Vector<String>& documentState() const;
void setDocumentState(const Vector<String>&);
void clearDocumentState();
void setURL(const KURL&);
void setURLString(const String&);
void setReferrer(const Referrer&);
void setTarget(const String&);
void setStateObject(PassRefPtr<SerializedScriptValue>);
SerializedScriptValue* stateObject() const { return m_stateObject.get(); }
void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number; }
long long itemSequenceNumber() const { return m_itemSequenceNumber; }
void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber = number; }
long long documentSequenceNumber() const { return m_documentSequenceNumber; }
void setFormInfoFromRequest(const ResourceRequest&);
void setFormData(PassRefPtr<FormData>);
void setFormContentType(const AtomicString&);
void deprecatedAddChildItem(PassRefPtr<HistoryItem>);
const HistoryItemVector& deprecatedChildren() const;
void deprecatedClearChildren();
bool isCurrentDocument(Document*) const;
private:
HistoryItem();
String m_urlString;
Referrer m_referrer;
String m_target;
IntPoint m_scrollPoint;
float m_pageScaleFactor;
Vector<String> m_documentState;
HistoryItemVector m_children;
int64_t m_itemSequenceNumber;
int64_t m_documentSequenceNumber;
RefPtr<SerializedScriptValue> m_stateObject;
RefPtr<FormData> m_formData;
AtomicString m_formContentType;
};
}
#endif