| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "platform/geometry/IntPoint.h" | 34 #include "platform/geometry/IntPoint.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "platform/weborigin/Referrer.h" | 36 #include "platform/weborigin/Referrer.h" |
| 37 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class Document; | 42 class Document; |
| 43 class DocumentState; | 43 class DocumentState; |
| 44 class FormData; | 44 class EncodedFormData; |
| 45 class KURL; | 45 class KURL; |
| 46 class ResourceRequest; | 46 class ResourceRequest; |
| 47 | 47 |
| 48 class CORE_EXPORT HistoryItem final : public RefCountedWillBeGarbageCollectedFin
alized<HistoryItem> { | 48 class CORE_EXPORT HistoryItem final : public RefCountedWillBeGarbageCollectedFin
alized<HistoryItem> { |
| 49 public: | 49 public: |
| 50 static PassRefPtrWillBeRawPtr<HistoryItem> create() | 50 static PassRefPtrWillBeRawPtr<HistoryItem> create() |
| 51 { | 51 { |
| 52 return adoptRefWillBeNoop(new HistoryItem); | 52 return adoptRefWillBeNoop(new HistoryItem); |
| 53 } | 53 } |
| 54 ~HistoryItem(); | 54 ~HistoryItem(); |
| 55 | 55 |
| 56 const String& urlString() const; | 56 const String& urlString() const; |
| 57 KURL url() const; | 57 KURL url() const; |
| 58 | 58 |
| 59 const Referrer& referrer() const; | 59 const Referrer& referrer() const; |
| 60 const String& target() const; | 60 const String& target() const; |
| 61 | 61 |
| 62 FormData* formData(); | 62 EncodedFormData* formData(); |
| 63 const AtomicString& formContentType() const; | 63 const AtomicString& formContentType() const; |
| 64 | 64 |
| 65 const FloatPoint& visualViewportScrollPoint() const; | 65 const FloatPoint& visualViewportScrollPoint() const; |
| 66 void setVisualViewportScrollPoint(const FloatPoint&); | 66 void setVisualViewportScrollPoint(const FloatPoint&); |
| 67 const IntPoint& scrollPoint() const; | 67 const IntPoint& scrollPoint() const; |
| 68 void setScrollPoint(const IntPoint&); | 68 void setScrollPoint(const IntPoint&); |
| 69 | 69 |
| 70 float pageScaleFactor() const; | 70 float pageScaleFactor() const; |
| 71 void setPageScaleFactor(float); | 71 void setPageScaleFactor(float); |
| 72 | 72 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 87 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } | 87 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } |
| 88 long long itemSequenceNumber() const { return m_itemSequenceNumber; } | 88 long long itemSequenceNumber() const { return m_itemSequenceNumber; } |
| 89 | 89 |
| 90 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } | 90 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } |
| 91 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} | 91 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} |
| 92 | 92 |
| 93 void setScrollRestorationType(HistoryScrollRestorationType type) { m_scroll
RestorationType = type; } | 93 void setScrollRestorationType(HistoryScrollRestorationType type) { m_scroll
RestorationType = type; } |
| 94 HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestor
ationType; } | 94 HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestor
ationType; } |
| 95 | 95 |
| 96 void setFormInfoFromRequest(const ResourceRequest&); | 96 void setFormInfoFromRequest(const ResourceRequest&); |
| 97 void setFormData(PassRefPtr<FormData>); | 97 void setFormData(PassRefPtr<EncodedFormData>); |
| 98 void setFormContentType(const AtomicString&); | 98 void setFormContentType(const AtomicString&); |
| 99 | 99 |
| 100 bool isCurrentDocument(Document*) const; | 100 bool isCurrentDocument(Document*) const; |
| 101 | 101 |
| 102 DECLARE_TRACE(); | 102 DECLARE_TRACE(); |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 HistoryItem(); | 105 HistoryItem(); |
| 106 | 106 |
| 107 String m_urlString; | 107 String m_urlString; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 126 int64_t m_documentSequenceNumber; | 126 int64_t m_documentSequenceNumber; |
| 127 | 127 |
| 128 // Type of the scroll restoration for the history item determines if scroll | 128 // Type of the scroll restoration for the history item determines if scroll |
| 129 // position should be restored when it is loaded during history traversal. | 129 // position should be restored when it is loaded during history traversal. |
| 130 HistoryScrollRestorationType m_scrollRestorationType; | 130 HistoryScrollRestorationType m_scrollRestorationType; |
| 131 | 131 |
| 132 // Support for HTML5 History | 132 // Support for HTML5 History |
| 133 RefPtr<SerializedScriptValue> m_stateObject; | 133 RefPtr<SerializedScriptValue> m_stateObject; |
| 134 | 134 |
| 135 // info used to repost form data | 135 // info used to repost form data |
| 136 RefPtr<FormData> m_formData; | 136 RefPtr<EncodedFormData> m_formData; |
| 137 AtomicString m_formContentType; | 137 AtomicString m_formContentType; |
| 138 | 138 |
| 139 }; // class HistoryItem | 139 }; // class HistoryItem |
| 140 | 140 |
| 141 } // namespace blink | 141 } // namespace blink |
| 142 | 142 |
| 143 #endif // HISTORYITEM_H | 143 #endif // HISTORYITEM_H |
| OLD | NEW |