| 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 22 matching lines...) Expand all Loading... |
| 33 #include <wtf/OwnPtr.h> | 33 #include <wtf/OwnPtr.h> |
| 34 #include <wtf/PassOwnPtr.h> | 34 #include <wtf/PassOwnPtr.h> |
| 35 #include <wtf/RefCounted.h> | 35 #include <wtf/RefCounted.h> |
| 36 #include <wtf/text/WTFString.h> | 36 #include <wtf/text/WTFString.h> |
| 37 | 37 |
| 38 #if PLATFORM(MAC) | 38 #if PLATFORM(MAC) |
| 39 #import <wtf/RetainPtr.h> | 39 #import <wtf/RetainPtr.h> |
| 40 typedef struct objc_object* id; | 40 typedef struct objc_object* id; |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #if PLATFORM(QT) | |
| 44 #include <QVariant> | |
| 45 #include <QByteArray> | |
| 46 #include <QDataStream> | |
| 47 #endif | |
| 48 | |
| 49 #if PLATFORM(BLACKBERRY) | 43 #if PLATFORM(BLACKBERRY) |
| 50 #include "HistoryItemViewState.h" | 44 #include "HistoryItemViewState.h" |
| 51 #endif | 45 #endif |
| 52 | 46 |
| 53 namespace WebCore { | 47 namespace WebCore { |
| 54 | 48 |
| 55 class CachedPage; | 49 class CachedPage; |
| 56 class Document; | 50 class Document; |
| 57 class FormData; | 51 class FormData; |
| 58 class HistoryItem; | 52 class HistoryItem; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 #if PLATFORM(MAC) | 185 #if PLATFORM(MAC) |
| 192 id viewState() const; | 186 id viewState() const; |
| 193 void setViewState(id); | 187 void setViewState(id); |
| 194 | 188 |
| 195 // Transient properties may be of any ObjC type. They are intended to be us
ed to store state per back/forward list entry. | 189 // Transient properties may be of any ObjC type. They are intended to be us
ed to store state per back/forward list entry. |
| 196 // The properties will not be persisted; when the history item is removed, t
he properties will be lost. | 190 // The properties will not be persisted; when the history item is removed, t
he properties will be lost. |
| 197 id getTransientProperty(const String&) const; | 191 id getTransientProperty(const String&) const; |
| 198 void setTransientProperty(const String&, id); | 192 void setTransientProperty(const String&, id); |
| 199 #endif | 193 #endif |
| 200 | 194 |
| 201 #if PLATFORM(QT) | |
| 202 QVariant userData() const { return m_userData; } | |
| 203 void setUserData(const QVariant& userData) { m_userData = userData; } | |
| 204 | |
| 205 static PassRefPtr<HistoryItem> restoreState(QDataStream& buffer, int version
); | |
| 206 QDataStream& saveState(QDataStream& out, int version) const; | |
| 207 #endif | |
| 208 | |
| 209 #if PLATFORM(BLACKBERRY) | 195 #if PLATFORM(BLACKBERRY) |
| 210 HistoryItemViewState& viewState() { return m_viewState; } | 196 HistoryItemViewState& viewState() { return m_viewState; } |
| 211 #endif | 197 #endif |
| 212 | 198 |
| 213 #ifndef NDEBUG | 199 #ifndef NDEBUG |
| 214 int showTree() const; | 200 int showTree() const; |
| 215 int showTreeWithIndent(unsigned indentLevel) const; | 201 int showTreeWithIndent(unsigned indentLevel) const; |
| 216 #endif | 202 #endif |
| 217 | 203 |
| 218 void adoptVisitCounts(Vector<int>& dailyCounts, Vector<int>& weeklyCounts); | 204 void adoptVisitCounts(Vector<int>& dailyCounts, Vector<int>& weeklyCounts); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 230 void padDailyCountsForNewVisit(double time); | 216 void padDailyCountsForNewVisit(double time); |
| 231 void collapseDailyVisitsToWeekly(); | 217 void collapseDailyVisitsToWeekly(); |
| 232 void recordVisitAtTime(double, VisitCountBehavior = IncreaseVisitCount); | 218 void recordVisitAtTime(double, VisitCountBehavior = IncreaseVisitCount); |
| 233 | 219 |
| 234 bool hasSameDocumentTree(HistoryItem* otherItem) const; | 220 bool hasSameDocumentTree(HistoryItem* otherItem) const; |
| 235 | 221 |
| 236 HistoryItem* findTargetItem(); | 222 HistoryItem* findTargetItem(); |
| 237 | 223 |
| 238 void encodeBackForwardTreeNode(Encoder&) const; | 224 void encodeBackForwardTreeNode(Encoder&) const; |
| 239 | 225 |
| 240 /* When adding new member variables to this class, please notify the Qt team
. | |
| 241 * qt/HistoryItemQt.cpp contains code to serialize history items. | |
| 242 */ | |
| 243 | |
| 244 String m_urlString; | 226 String m_urlString; |
| 245 String m_originalURLString; | 227 String m_originalURLString; |
| 246 String m_referrer; | 228 String m_referrer; |
| 247 String m_target; | 229 String m_target; |
| 248 String m_parent; | 230 String m_parent; |
| 249 String m_title; | 231 String m_title; |
| 250 String m_displayTitle; | 232 String m_displayTitle; |
| 251 | 233 |
| 252 double m_lastVisitedTime; | 234 double m_lastVisitedTime; |
| 253 bool m_lastVisitWasHTTPNonGet; | 235 bool m_lastVisitWasHTTPNonGet; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // PageCache controls these fields. | 269 // PageCache controls these fields. |
| 288 HistoryItem* m_next; | 270 HistoryItem* m_next; |
| 289 HistoryItem* m_prev; | 271 HistoryItem* m_prev; |
| 290 RefPtr<CachedPage> m_cachedPage; | 272 RefPtr<CachedPage> m_cachedPage; |
| 291 | 273 |
| 292 #if PLATFORM(MAC) | 274 #if PLATFORM(MAC) |
| 293 RetainPtr<id> m_viewState; | 275 RetainPtr<id> m_viewState; |
| 294 OwnPtr<HashMap<String, RetainPtr<id> > > m_transientProperties; | 276 OwnPtr<HashMap<String, RetainPtr<id> > > m_transientProperties; |
| 295 #endif | 277 #endif |
| 296 | 278 |
| 297 #if PLATFORM(QT) | |
| 298 QVariant m_userData; | |
| 299 #endif | |
| 300 | |
| 301 #if PLATFORM(BLACKBERRY) | |
| 302 HistoryItemViewState m_viewState; | |
| 303 #endif | |
| 304 }; //class HistoryItem | 279 }; //class HistoryItem |
| 305 | 280 |
| 306 } //namespace WebCore | 281 } //namespace WebCore |
| 307 | 282 |
| 308 #ifndef NDEBUG | 283 #ifndef NDEBUG |
| 309 // Outside the WebCore namespace for ease of invocation from gdb. | 284 // Outside the WebCore namespace for ease of invocation from gdb. |
| 310 extern "C" int showTree(const WebCore::HistoryItem*); | 285 extern "C" int showTree(const WebCore::HistoryItem*); |
| 311 #endif | 286 #endif |
| 312 | 287 |
| 313 #endif // HISTORYITEM_H | 288 #endif // HISTORYITEM_H |
| OLD | NEW |