Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Side by Side Diff: third_party/WebKit/WebCore/history/HistoryItem.h

Issue 21152: WebKit merge 40668:40722 part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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();
125 126
126 void setVisitCount(int); 127 void setVisitCount(int);
127 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa ilure; } 128 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa ilure; }
128 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet = wasNotGet; } 129 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet = wasNotGet; }
129 130
130 void addChildItem(PassRefPtr<HistoryItem>); 131 void addChildItem(PassRefPtr<HistoryItem>);
131 HistoryItem* childItemWithName(const String&) const; 132 HistoryItem* childItemWithName(const String&) const;
132 HistoryItem* targetItem(); 133 HistoryItem* targetItem();
133 HistoryItem* recurseToFindTargetItem(); 134 HistoryItem* recurseToFindTargetItem();
134 const HistoryItemVector& children() const; 135 const HistoryItemVector& children() const;
(...skipping 23 matching lines...) Expand all
158 #if PLATFORM(QT) 159 #if PLATFORM(QT)
159 QVariant userData() const { return m_userData; } 160 QVariant userData() const { return m_userData; }
160 void setUserData(const QVariant& userData) { m_userData = userData; } 161 void setUserData(const QVariant& userData) { m_userData = userData; }
161 #endif 162 #endif
162 163
163 #ifndef NDEBUG 164 #ifndef NDEBUG
164 int showTree() const; 165 int showTree() const;
165 int showTreeWithIndent(unsigned indentLevel) const; 166 int showTreeWithIndent(unsigned indentLevel) const;
166 #endif 167 #endif
167 168
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
168 private: 173 private:
169 HistoryItem(); 174 HistoryItem();
170 HistoryItem(const String& urlString, const String& title, double lastVisited ); 175 HistoryItem(const String& urlString, const String& title, double lastVisited );
171 HistoryItem(const String& urlString, const String& title, const String& alte rnateTitle, double lastVisited); 176 HistoryItem(const String& urlString, const String& title, const String& alte rnateTitle, double lastVisited);
172 HistoryItem(const KURL& url, const String& target, const String& parent, con st String& title); 177 HistoryItem(const KURL& url, const String& target, const String& parent, con st String& title);
173 178
174 HistoryItem(const HistoryItem&); 179 HistoryItem(const HistoryItem&);
175 180
181 void padDailyCountsForNewVisit(double time);
182 void collapseDailyVisitsToWeekly();
183 void recordVisitAtTime(double);
184
176 String m_urlString; 185 String m_urlString;
177 String m_originalURLString; 186 String m_originalURLString;
178 String m_referrer; 187 String m_referrer;
179 String m_target; 188 String m_target;
180 String m_parent; 189 String m_parent;
181 String m_title; 190 String m_title;
182 String m_displayTitle; 191 String m_displayTitle;
183 192
184 double m_lastVisitedTime; 193 double m_lastVisitedTime;
185 bool m_lastVisitWasHTTPNonGet; 194 bool m_lastVisitWasHTTPNonGet;
186 195
187 IntPoint m_scrollPoint; 196 IntPoint m_scrollPoint;
188 Vector<String> m_documentState; 197 Vector<String> m_documentState;
189 198
190 HistoryItemVector m_subItems; 199 HistoryItemVector m_subItems;
191 200
192 bool m_lastVisitWasFailure; 201 bool m_lastVisitWasFailure;
193 bool m_isTargetItem; 202 bool m_isTargetItem;
194 int m_visitCount; 203 int m_visitCount;
204 Vector<int> m_dailyVisitCounts;
205 Vector<int> m_weeklyVisitCounts;
195 206
196 OwnPtr<Vector<String> > m_redirectURLs; 207 OwnPtr<Vector<String> > m_redirectURLs;
197 208
198 // info used to repost form data 209 // info used to repost form data
199 RefPtr<FormData> m_formData; 210 RefPtr<FormData> m_formData;
200 String m_formContentType; 211 String m_formContentType;
201 212
202 // PageCache controls these fields. 213 // PageCache controls these fields.
203 HistoryItem* m_next; 214 HistoryItem* m_next;
204 HistoryItem* m_prev; 215 HistoryItem* m_prev;
(...skipping 11 matching lines...) Expand all
216 227
217 } //namespace WebCore 228 } //namespace WebCore
218 229
219 #ifndef NDEBUG 230 #ifndef NDEBUG
220 // Outside the WebCore namespace for ease of invocation from gdb. 231 // Outside the WebCore namespace for ease of invocation from gdb.
221 extern "C" int showTree(const WebCore::HistoryItem*); 232 extern "C" int showTree(const WebCore::HistoryItem*);
222 #endif 233 #endif
223 234
224 #endif // HISTORYITEM_H 235 #endif // HISTORYITEM_H
225 236
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/editing/mac/SelectionControllerMac.mm ('k') | third_party/WebKit/WebCore/history/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698