| 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 25 matching lines...) Expand all Loading... |
| 36 #include "platform/weborigin/Referrer.h" | 36 #include "platform/weborigin/Referrer.h" |
| 37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class Document; | 41 class Document; |
| 42 class DocumentState; | 42 class DocumentState; |
| 43 class EncodedFormData; | 43 class EncodedFormData; |
| 44 class KURL; | 44 class KURL; |
| 45 class ResourceRequest; | 45 class ResourceRequest; |
| 46 class SecurityOrigin; |
| 46 | 47 |
| 47 class CORE_EXPORT HistoryItem final : public GarbageCollectedFinalized<HistoryIt
em> { | 48 class CORE_EXPORT HistoryItem final : public GarbageCollectedFinalized<HistoryIt
em> { |
| 48 public: | 49 public: |
| 49 static HistoryItem* create() | 50 static HistoryItem* create() |
| 50 { | 51 { |
| 51 return new HistoryItem; | 52 return new HistoryItem; |
| 52 } | 53 } |
| 53 ~HistoryItem(); | 54 ~HistoryItem(); |
| 54 | 55 |
| 55 const String& urlString() const; | 56 const String& urlString() const; |
| 56 KURL url() const; | 57 KURL url() const; |
| 57 | 58 |
| 58 const Referrer& referrer() const; | 59 const Referrer& referrer() const; |
| 60 PassRefPtr<SecurityOrigin> requestorOrigin() const; |
| 59 const String& target() const; | 61 const String& target() const; |
| 60 | 62 |
| 61 EncodedFormData* formData(); | 63 EncodedFormData* formData(); |
| 62 const AtomicString& formContentType() const; | 64 const AtomicString& formContentType() const; |
| 63 | 65 |
| 64 const FloatPoint& visualViewportScrollPoint() const; | 66 const FloatPoint& visualViewportScrollPoint() const; |
| 65 void setVisualViewportScrollPoint(const FloatPoint&); | 67 void setVisualViewportScrollPoint(const FloatPoint&); |
| 66 const IntPoint& scrollPoint() const; | 68 const IntPoint& scrollPoint() const; |
| 67 void setScrollPoint(const IntPoint&); | 69 void setScrollPoint(const IntPoint&); |
| 68 | 70 |
| 69 float pageScaleFactor() const; | 71 float pageScaleFactor() const; |
| 70 void setPageScaleFactor(float); | 72 void setPageScaleFactor(float); |
| 71 | 73 |
| 72 Vector<String> getReferencedFilePaths(); | 74 Vector<String> getReferencedFilePaths(); |
| 73 const Vector<String>& documentState(); | 75 const Vector<String>& documentState(); |
| 74 void setDocumentState(const Vector<String>&); | 76 void setDocumentState(const Vector<String>&); |
| 75 void setDocumentState(DocumentState*); | 77 void setDocumentState(DocumentState*); |
| 76 void clearDocumentState(); | 78 void clearDocumentState(); |
| 77 | 79 |
| 78 void setURL(const KURL&); | 80 void setURL(const KURL&); |
| 79 void setURLString(const String&); | 81 void setURLString(const String&); |
| 80 void setReferrer(const Referrer&); | 82 void setReferrer(const Referrer&); |
| 83 void setRequestorOrigin(PassRefPtr<SecurityOrigin>); |
| 81 void setTarget(const String&); | 84 void setTarget(const String&); |
| 82 | 85 |
| 83 void setStateObject(PassRefPtr<SerializedScriptValue>); | 86 void setStateObject(PassRefPtr<SerializedScriptValue>); |
| 84 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } | 87 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } |
| 85 | 88 |
| 86 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } | 89 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } |
| 87 long long itemSequenceNumber() const { return m_itemSequenceNumber; } | 90 long long itemSequenceNumber() const { return m_itemSequenceNumber; } |
| 88 | 91 |
| 89 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } | 92 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } |
| 90 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} | 93 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} |
| 91 | 94 |
| 92 void setScrollRestorationType(HistoryScrollRestorationType type) { m_scroll
RestorationType = type; } | 95 void setScrollRestorationType(HistoryScrollRestorationType type) { m_scroll
RestorationType = type; } |
| 93 HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestor
ationType; } | 96 HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestor
ationType; } |
| 94 | 97 |
| 95 void setFormInfoFromRequest(const ResourceRequest&); | 98 void setFormInfoFromRequest(const ResourceRequest&); |
| 96 void setFormData(PassRefPtr<EncodedFormData>); | 99 void setFormData(PassRefPtr<EncodedFormData>); |
| 97 void setFormContentType(const AtomicString&); | 100 void setFormContentType(const AtomicString&); |
| 98 | 101 |
| 99 bool isCurrentDocument(Document*) const; | 102 bool isCurrentDocument(Document*) const; |
| 100 | 103 |
| 101 DECLARE_TRACE(); | 104 DECLARE_TRACE(); |
| 102 | 105 |
| 103 private: | 106 private: |
| 104 HistoryItem(); | 107 HistoryItem(); |
| 105 | 108 |
| 106 String m_urlString; | 109 String m_urlString; |
| 107 Referrer m_referrer; | 110 Referrer m_referrer; |
| 111 String m_requestorOrigin; |
| 108 String m_target; | 112 String m_target; |
| 109 | 113 |
| 110 FloatPoint m_visualViewportScrollPoint; | 114 FloatPoint m_visualViewportScrollPoint; |
| 111 IntPoint m_scrollPoint; | 115 IntPoint m_scrollPoint; |
| 112 float m_pageScaleFactor; | 116 float m_pageScaleFactor; |
| 113 Vector<String> m_documentStateVector; | 117 Vector<String> m_documentStateVector; |
| 114 Member<DocumentState> m_documentState; | 118 Member<DocumentState> m_documentState; |
| 115 | 119 |
| 116 // If two HistoryItems have the same item sequence number, then they are | 120 // If two HistoryItems have the same item sequence number, then they are |
| 117 // clones of one another. Traversing history from one such HistoryItem to | 121 // clones of one another. Traversing history from one such HistoryItem to |
| (...skipping 15 matching lines...) Expand all Loading... |
| 133 | 137 |
| 134 // info used to repost form data | 138 // info used to repost form data |
| 135 RefPtr<EncodedFormData> m_formData; | 139 RefPtr<EncodedFormData> m_formData; |
| 136 AtomicString m_formContentType; | 140 AtomicString m_formContentType; |
| 137 | 141 |
| 138 }; // class HistoryItem | 142 }; // class HistoryItem |
| 139 | 143 |
| 140 } // namespace blink | 144 } // namespace blink |
| 141 | 145 |
| 142 #endif // HISTORYITEM_H | 146 #endif // HISTORYITEM_H |
| OLD | NEW |