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

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

Issue 2124143005: Revert of Teach HistoryItem about a request's initiator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 25 matching lines...) Expand all
36 #include "platform/weborigin/Referrer.h" 36 #include "platform/weborigin/Referrer.h"
37 #include "wtf/text/WTFString.h" 37 #include "wtf/text/WTFString.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class Document; 41 class Document;
42 class DocumentState; 42 class DocumentState;
43 class EncodedFormData; 43 class EncodedFormData;
44 class KURL; 44 class KURL;
45 class ResourceRequest; 45 class ResourceRequest;
46 class SecurityOrigin;
47 46
48 class CORE_EXPORT HistoryItem final : public GarbageCollectedFinalized<HistoryIt em> { 47 class CORE_EXPORT HistoryItem final : public GarbageCollectedFinalized<HistoryIt em> {
49 public: 48 public:
50 static HistoryItem* create() 49 static HistoryItem* create()
51 { 50 {
52 return new HistoryItem; 51 return new HistoryItem;
53 } 52 }
54 ~HistoryItem(); 53 ~HistoryItem();
55 54
56 const String& urlString() const; 55 const String& urlString() const;
57 KURL url() const; 56 KURL url() const;
58 57
59 const Referrer& referrer() const; 58 const Referrer& referrer() const;
60 PassRefPtr<SecurityOrigin> requestorOrigin() const;
61 const String& target() const; 59 const String& target() const;
62 60
63 EncodedFormData* formData(); 61 EncodedFormData* formData();
64 const AtomicString& formContentType() const; 62 const AtomicString& formContentType() const;
65 63
66 const FloatPoint& visualViewportScrollPoint() const; 64 const FloatPoint& visualViewportScrollPoint() const;
67 void setVisualViewportScrollPoint(const FloatPoint&); 65 void setVisualViewportScrollPoint(const FloatPoint&);
68 const IntPoint& scrollPoint() const; 66 const IntPoint& scrollPoint() const;
69 void setScrollPoint(const IntPoint&); 67 void setScrollPoint(const IntPoint&);
70 68
71 float pageScaleFactor() const; 69 float pageScaleFactor() const;
72 void setPageScaleFactor(float); 70 void setPageScaleFactor(float);
73 71
74 Vector<String> getReferencedFilePaths(); 72 Vector<String> getReferencedFilePaths();
75 const Vector<String>& documentState(); 73 const Vector<String>& documentState();
76 void setDocumentState(const Vector<String>&); 74 void setDocumentState(const Vector<String>&);
77 void setDocumentState(DocumentState*); 75 void setDocumentState(DocumentState*);
78 void clearDocumentState(); 76 void clearDocumentState();
79 77
80 void setURL(const KURL&); 78 void setURL(const KURL&);
81 void setURLString(const String&); 79 void setURLString(const String&);
82 void setReferrer(const Referrer&); 80 void setReferrer(const Referrer&);
83 void setRequestorOrigin(PassRefPtr<SecurityOrigin>);
84 void setTarget(const String&); 81 void setTarget(const String&);
85 82
86 void setStateObject(PassRefPtr<SerializedScriptValue>); 83 void setStateObject(PassRefPtr<SerializedScriptValue>);
87 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } 84 SerializedScriptValue* stateObject() const { return m_stateObject.get(); }
88 85
89 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number ; } 86 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number ; }
90 long long itemSequenceNumber() const { return m_itemSequenceNumber; } 87 long long itemSequenceNumber() const { return m_itemSequenceNumber; }
91 88
92 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber = number; } 89 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber = number; }
93 long long documentSequenceNumber() const { return m_documentSequenceNumber; } 90 long long documentSequenceNumber() const { return m_documentSequenceNumber; }
94 91
95 void setScrollRestorationType(HistoryScrollRestorationType type) { m_scroll RestorationType = type; } 92 void setScrollRestorationType(HistoryScrollRestorationType type) { m_scroll RestorationType = type; }
96 HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestor ationType; } 93 HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestor ationType; }
97 94
98 void setFormInfoFromRequest(const ResourceRequest&); 95 void setFormInfoFromRequest(const ResourceRequest&);
99 void setFormData(PassRefPtr<EncodedFormData>); 96 void setFormData(PassRefPtr<EncodedFormData>);
100 void setFormContentType(const AtomicString&); 97 void setFormContentType(const AtomicString&);
101 98
102 bool isCurrentDocument(Document*) const; 99 bool isCurrentDocument(Document*) const;
103 100
104 DECLARE_TRACE(); 101 DECLARE_TRACE();
105 102
106 private: 103 private:
107 HistoryItem(); 104 HistoryItem();
108 105
109 String m_urlString; 106 String m_urlString;
110 Referrer m_referrer; 107 Referrer m_referrer;
111 String m_requestorOrigin;
112 String m_target; 108 String m_target;
113 109
114 FloatPoint m_visualViewportScrollPoint; 110 FloatPoint m_visualViewportScrollPoint;
115 IntPoint m_scrollPoint; 111 IntPoint m_scrollPoint;
116 float m_pageScaleFactor; 112 float m_pageScaleFactor;
117 Vector<String> m_documentStateVector; 113 Vector<String> m_documentStateVector;
118 Member<DocumentState> m_documentState; 114 Member<DocumentState> m_documentState;
119 115
120 // If two HistoryItems have the same item sequence number, then they are 116 // If two HistoryItems have the same item sequence number, then they are
121 // clones of one another. Traversing history from one such HistoryItem to 117 // clones of one another. Traversing history from one such HistoryItem to
(...skipping 15 matching lines...) Expand all
137 133
138 // info used to repost form data 134 // info used to repost form data
139 RefPtr<EncodedFormData> m_formData; 135 RefPtr<EncodedFormData> m_formData;
140 AtomicString m_formContentType; 136 AtomicString m_formContentType;
141 137
142 }; // class HistoryItem 138 }; // class HistoryItem
143 139
144 } // namespace blink 140 } // namespace blink
145 141
146 #endif // HISTORYITEM_H 142 #endif // HISTORYITEM_H
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698