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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void setURLString(const String&); | 115 void setURLString(const String&); |
116 void setOriginalURLString(const String&); | 116 void setOriginalURLString(const String&); |
117 void setReferrer(const String&); | 117 void setReferrer(const String&); |
118 void setTarget(const String&); | 118 void setTarget(const String&); |
119 void setParent(const String&); | 119 void setParent(const String&); |
120 void setTitle(const String&); | 120 void setTitle(const String&); |
121 void setIsTargetItem(bool); | 121 void setIsTargetItem(bool); |
122 | 122 |
123 void setFormInfoFromRequest(const ResourceRequest&); | 123 void setFormInfoFromRequest(const ResourceRequest&); |
124 | 124 |
125 void recordInitialVisit(); | |
126 | 125 |
127 void setVisitCount(int); | 126 void setVisitCount(int); |
128 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa
ilure; } | 127 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa
ilure; } |
129 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet =
wasNotGet; } | 128 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet =
wasNotGet; } |
130 | 129 |
131 void addChildItem(PassRefPtr<HistoryItem>); | 130 void addChildItem(PassRefPtr<HistoryItem>); |
132 HistoryItem* childItemWithName(const String&) const; | 131 HistoryItem* childItemWithName(const String&) const; |
133 HistoryItem* targetItem(); | 132 HistoryItem* targetItem(); |
134 HistoryItem* recurseToFindTargetItem(); | 133 HistoryItem* recurseToFindTargetItem(); |
135 const HistoryItemVector& children() const; | 134 const HistoryItemVector& children() const; |
(...skipping 23 matching lines...) Expand all Loading... |
159 #if PLATFORM(QT) | 158 #if PLATFORM(QT) |
160 QVariant userData() const { return m_userData; } | 159 QVariant userData() const { return m_userData; } |
161 void setUserData(const QVariant& userData) { m_userData = userData; } | 160 void setUserData(const QVariant& userData) { m_userData = userData; } |
162 #endif | 161 #endif |
163 | 162 |
164 #ifndef NDEBUG | 163 #ifndef NDEBUG |
165 int showTree() const; | 164 int showTree() const; |
166 int showTreeWithIndent(unsigned indentLevel) const; | 165 int showTreeWithIndent(unsigned indentLevel) const; |
167 #endif | 166 #endif |
168 | 167 |
169 void adoptVisitCounts(Vector<int>& dailyCounts, Vector<int>& weeklyCounts); | |
170 const Vector<int>& dailyVisitCounts() { return m_dailyVisitCounts; } | |
171 const Vector<int>& weeklyVisitCounts() { return m_weeklyVisitCounts; } | |
172 | |
173 private: | 168 private: |
174 HistoryItem(); | 169 HistoryItem(); |
175 HistoryItem(const String& urlString, const String& title, double lastVisited
); | 170 HistoryItem(const String& urlString, const String& title, double lastVisited
); |
176 HistoryItem(const String& urlString, const String& title, const String& alte
rnateTitle, double lastVisited); | 171 HistoryItem(const String& urlString, const String& title, const String& alte
rnateTitle, double lastVisited); |
177 HistoryItem(const KURL& url, const String& target, const String& parent, con
st String& title); | 172 HistoryItem(const KURL& url, const String& target, const String& parent, con
st String& title); |
178 | 173 |
179 HistoryItem(const HistoryItem&); | 174 HistoryItem(const HistoryItem&); |
180 | 175 |
181 void padDailyCountsForNewVisit(double time); | |
182 void collapseDailyVisitsToWeekly(); | |
183 void recordVisitAtTime(double); | |
184 | |
185 String m_urlString; | 176 String m_urlString; |
186 String m_originalURLString; | 177 String m_originalURLString; |
187 String m_referrer; | 178 String m_referrer; |
188 String m_target; | 179 String m_target; |
189 String m_parent; | 180 String m_parent; |
190 String m_title; | 181 String m_title; |
191 String m_displayTitle; | 182 String m_displayTitle; |
192 | 183 |
193 double m_lastVisitedTime; | 184 double m_lastVisitedTime; |
194 bool m_lastVisitWasHTTPNonGet; | 185 bool m_lastVisitWasHTTPNonGet; |
195 | 186 |
196 IntPoint m_scrollPoint; | 187 IntPoint m_scrollPoint; |
197 Vector<String> m_documentState; | 188 Vector<String> m_documentState; |
198 | 189 |
199 HistoryItemVector m_subItems; | 190 HistoryItemVector m_subItems; |
200 | 191 |
201 bool m_lastVisitWasFailure; | 192 bool m_lastVisitWasFailure; |
202 bool m_isTargetItem; | 193 bool m_isTargetItem; |
203 int m_visitCount; | 194 int m_visitCount; |
204 Vector<int> m_dailyVisitCounts; | |
205 Vector<int> m_weeklyVisitCounts; | |
206 | 195 |
207 OwnPtr<Vector<String> > m_redirectURLs; | 196 OwnPtr<Vector<String> > m_redirectURLs; |
208 | 197 |
209 // info used to repost form data | 198 // info used to repost form data |
210 RefPtr<FormData> m_formData; | 199 RefPtr<FormData> m_formData; |
211 String m_formContentType; | 200 String m_formContentType; |
212 | 201 |
213 // PageCache controls these fields. | 202 // PageCache controls these fields. |
214 HistoryItem* m_next; | 203 HistoryItem* m_next; |
215 HistoryItem* m_prev; | 204 HistoryItem* m_prev; |
(...skipping 11 matching lines...) Expand all Loading... |
227 | 216 |
228 } //namespace WebCore | 217 } //namespace WebCore |
229 | 218 |
230 #ifndef NDEBUG | 219 #ifndef NDEBUG |
231 // Outside the WebCore namespace for ease of invocation from gdb. | 220 // Outside the WebCore namespace for ease of invocation from gdb. |
232 extern "C" int showTree(const WebCore::HistoryItem*); | 221 extern "C" int showTree(const WebCore::HistoryItem*); |
233 #endif | 222 #endif |
234 | 223 |
235 #endif // HISTORYITEM_H | 224 #endif // HISTORYITEM_H |
236 | 225 |
OLD | NEW |