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

Side by Side Diff: Source/core/loader/HistoryItem.h

Issue 239993011: Lazily generate HistoryItem's serialized form state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged to trunk Created 6 years, 8 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
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 29
30 #include "bindings/v8/SerializedScriptValue.h" 30 #include "bindings/v8/SerializedScriptValue.h"
31 #include "platform/geometry/IntPoint.h" 31 #include "platform/geometry/IntPoint.h"
32 #include "platform/weborigin/Referrer.h" 32 #include "platform/weborigin/Referrer.h"
33 #include "wtf/RefCounted.h" 33 #include "wtf/RefCounted.h"
34 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class Document; 38 class Document;
39 class DocumentState;
39 class FormData; 40 class FormData;
40 class HistoryItem; 41 class HistoryItem;
41 class Image; 42 class Image;
42 class KURL; 43 class KURL;
43 class ResourceRequest; 44 class ResourceRequest;
44 45
45 typedef Vector<RefPtr<HistoryItem> > HistoryItemVector; 46 typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
46 47
47 class HistoryItem : public RefCounted<HistoryItem> { 48 class HistoryItem : public RefCounted<HistoryItem> {
48 public: 49 public:
(...skipping 13 matching lines...) Expand all
62 FormData* formData(); 63 FormData* formData();
63 const AtomicString& formContentType() const; 64 const AtomicString& formContentType() const;
64 65
65 const IntPoint& scrollPoint() const; 66 const IntPoint& scrollPoint() const;
66 void setScrollPoint(const IntPoint&); 67 void setScrollPoint(const IntPoint&);
67 void clearScrollPoint(); 68 void clearScrollPoint();
68 69
69 float pageScaleFactor() const; 70 float pageScaleFactor() const;
70 void setPageScaleFactor(float); 71 void setPageScaleFactor(float);
71 72
72 const Vector<String>& documentState() const; 73 Vector<String> getReferencedFilePaths();
74 const Vector<String>& documentState();
73 void setDocumentState(const Vector<String>&); 75 void setDocumentState(const Vector<String>&);
76 void setDocumentState(DocumentState*);
74 void clearDocumentState(); 77 void clearDocumentState();
75 78
76 void setURL(const KURL&); 79 void setURL(const KURL&);
77 void setURLString(const String&); 80 void setURLString(const String&);
78 void setReferrer(const Referrer&); 81 void setReferrer(const Referrer&);
79 void setTarget(const String&); 82 void setTarget(const String&);
80 83
81 void setStateObject(PassRefPtr<SerializedScriptValue>); 84 void setStateObject(PassRefPtr<SerializedScriptValue>);
82 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } 85 SerializedScriptValue* stateObject() const { return m_stateObject.get(); }
83 86
(...skipping 18 matching lines...) Expand all
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;
108 String m_target; 111 String m_target;
109 112
110 IntPoint m_scrollPoint; 113 IntPoint m_scrollPoint;
111 float m_pageScaleFactor; 114 float m_pageScaleFactor;
112 Vector<String> m_documentState; 115 Vector<String> m_documentStateVector;
116 RefPtr<DocumentState> m_documentState;
113 117
114 HistoryItemVector m_children; 118 HistoryItemVector m_children;
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
118 // another is a no-op. HistoryItem clones are created for parent and 122 // another is a no-op. HistoryItem clones are created for parent and
119 // sibling frames when only a subframe navigates. 123 // sibling frames when only a subframe navigates.
120 int64_t m_itemSequenceNumber; 124 int64_t m_itemSequenceNumber;
121 125
122 // If two HistoryItems have the same document sequence number, then they 126 // If two HistoryItems have the same document sequence number, then they
123 // refer to the same instance of a document. Traversing history from one 127 // refer to the same instance of a document. Traversing history from one
124 // such HistoryItem to another preserves the document. 128 // such HistoryItem to another preserves the document.
125 int64_t m_documentSequenceNumber; 129 int64_t m_documentSequenceNumber;
126 130
127 // Support for HTML5 History 131 // Support for HTML5 History
128 RefPtr<SerializedScriptValue> m_stateObject; 132 RefPtr<SerializedScriptValue> m_stateObject;
129 133
130 // info used to repost form data 134 // info used to repost form data
131 RefPtr<FormData> m_formData; 135 RefPtr<FormData> m_formData;
132 AtomicString m_formContentType; 136 AtomicString m_formContentType;
133 137
134 }; // class HistoryItem 138 }; // class HistoryItem
135 139
136 } // namespace WebCore 140 } // namespace WebCore
137 141
138 #endif // HISTORYITEM_H 142 #endif // HISTORYITEM_H
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698