OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 static PassRefPtr<HistoryItem> create(const KURL& url, const String& target,
const String& parent, const String& title) | 82 static PassRefPtr<HistoryItem> create(const KURL& url, const String& target,
const String& parent, const String& title) |
83 { | 83 { |
84 return adoptRef(new HistoryItem(url, target, parent, title)); | 84 return adoptRef(new HistoryItem(url, target, parent, title)); |
85 } | 85 } |
86 | 86 |
87 ~HistoryItem(); | 87 ~HistoryItem(); |
88 | 88 |
89 PassRefPtr<HistoryItem> copy() const; | 89 PassRefPtr<HistoryItem> copy() const; |
90 | 90 |
91 // Resets the HistoryItem to its initial state, as returned by create(). | |
92 void reset(); | |
93 | |
94 const String& originalURLString() const; | 91 const String& originalURLString() const; |
95 const String& urlString() const; | 92 const String& urlString() const; |
96 const String& title() const; | 93 const String& title() const; |
97 | 94 |
98 bool isInPageCache() const { return m_cachedPage; } | 95 bool isInPageCache() const { return m_cachedPage; } |
99 | 96 |
100 double lastVisitedTime() const; | 97 double lastVisitedTime() const; |
101 | 98 |
102 void setAlternateTitle(const String& alternateTitle); | 99 void setAlternateTitle(const String& alternateTitle); |
103 const String& alternateTitle() const; | 100 const String& alternateTitle() const; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void setIsTargetItem(bool); | 134 void setIsTargetItem(bool); |
138 | 135 |
139 void setStateObject(PassRefPtr<SerializedScriptValue> object); | 136 void setStateObject(PassRefPtr<SerializedScriptValue> object); |
140 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } | 137 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } |
141 | 138 |
142 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } | 139 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } |
143 long long itemSequenceNumber() const { return m_itemSequenceNumber; } | 140 long long itemSequenceNumber() const { return m_itemSequenceNumber; } |
144 | 141 |
145 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } | 142 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } |
146 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} | 143 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} |
147 | 144 |
148 void setFormInfoFromRequest(const ResourceRequest&); | 145 void setFormInfoFromRequest(const ResourceRequest&); |
149 void setFormData(PassRefPtr<FormData>); | 146 void setFormData(PassRefPtr<FormData>); |
150 void setFormContentType(const String&); | 147 void setFormContentType(const String&); |
151 | 148 |
152 void recordInitialVisit(); | 149 void recordInitialVisit(); |
153 | 150 |
154 void setVisitCount(int); | 151 void setVisitCount(int); |
155 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa
ilure; } | 152 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa
ilure; } |
156 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet =
wasNotGet; } | 153 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet =
wasNotGet; } |
157 | 154 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 HistoryItemVector m_children; | 244 HistoryItemVector m_children; |
248 | 245 |
249 bool m_lastVisitWasFailure; | 246 bool m_lastVisitWasFailure; |
250 bool m_isTargetItem; | 247 bool m_isTargetItem; |
251 int m_visitCount; | 248 int m_visitCount; |
252 Vector<int> m_dailyVisitCounts; | 249 Vector<int> m_dailyVisitCounts; |
253 Vector<int> m_weeklyVisitCounts; | 250 Vector<int> m_weeklyVisitCounts; |
254 | 251 |
255 OwnPtr<Vector<String> > m_redirectURLs; | 252 OwnPtr<Vector<String> > m_redirectURLs; |
256 | 253 |
257 // If two HistoryItems have the same item sequence number, then they are | |
258 // clones of one another. Traversing history from one such HistoryItem to | |
259 // another is a no-op. HistoryItem clones are created for parent and | |
260 // sibling frames when only a subframe navigates. | |
261 long long m_itemSequenceNumber; | 254 long long m_itemSequenceNumber; |
262 | 255 |
263 // If two HistoryItems have the same document sequence number, then they | |
264 // refer to the same instance of a document. Traversing history from one | |
265 // such HistoryItem to another preserves the document. | |
266 long long m_documentSequenceNumber; | |
267 | |
268 // Support for HTML5 History | 256 // Support for HTML5 History |
269 RefPtr<SerializedScriptValue> m_stateObject; | 257 RefPtr<SerializedScriptValue> m_stateObject; |
| 258 long long m_documentSequenceNumber; |
270 | 259 |
271 // info used to repost form data | 260 // info used to repost form data |
272 RefPtr<FormData> m_formData; | 261 RefPtr<FormData> m_formData; |
273 String m_formContentType; | 262 String m_formContentType; |
274 | 263 |
275 // PageCache controls these fields. | 264 // PageCache controls these fields. |
276 HistoryItem* m_next; | 265 HistoryItem* m_next; |
277 HistoryItem* m_prev; | 266 HistoryItem* m_prev; |
278 RefPtr<CachedPage> m_cachedPage; | 267 RefPtr<CachedPage> m_cachedPage; |
279 | 268 |
(...skipping 13 matching lines...) Expand all Loading... |
293 }; //class HistoryItem | 282 }; //class HistoryItem |
294 | 283 |
295 } //namespace WebCore | 284 } //namespace WebCore |
296 | 285 |
297 #ifndef NDEBUG | 286 #ifndef NDEBUG |
298 // Outside the WebCore namespace for ease of invocation from gdb. | 287 // Outside the WebCore namespace for ease of invocation from gdb. |
299 extern "C" int showTree(const WebCore::HistoryItem*); | 288 extern "C" int showTree(const WebCore::HistoryItem*); |
300 #endif | 289 #endif |
301 | 290 |
302 #endif // HISTORYITEM_H | 291 #endif // HISTORYITEM_H |
OLD | NEW |