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

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

Issue 28983004: Split the frame tree logic out of HistoryItem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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, 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 void setURL(const KURL&); 79 void setURL(const KURL&);
80 void setURLString(const String&); 80 void setURLString(const String&);
81 void setOriginalURLString(const String&); 81 void setOriginalURLString(const String&);
82 void setReferrer(const String&); 82 void setReferrer(const String&);
83 void setTarget(const String&); 83 void setTarget(const String&);
84 84
85 void setStateObject(PassRefPtr<SerializedScriptValue> object); 85 void setStateObject(PassRefPtr<SerializedScriptValue> object);
86 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } 86 SerializedScriptValue* stateObject() const { return m_stateObject.get(); }
87 87
88 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number ; }
89 long long itemSequenceNumber() const { return m_itemSequenceNumber; } 88 long long itemSequenceNumber() const { return m_itemSequenceNumber; }
90 89
91 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber = number; } 90 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber = number; }
92 long long documentSequenceNumber() const { return m_documentSequenceNumber; } 91 long long documentSequenceNumber() const { return m_documentSequenceNumber; }
93 92
94 void setFormInfoFromRequest(const ResourceRequest&); 93 void setFormInfoFromRequest(const ResourceRequest&);
95 void setFormData(PassRefPtr<FormData>); 94 void setFormData(PassRefPtr<FormData>);
96 void setFormContentType(const String&); 95 void setFormContentType(const String&);
97 96
98 void addChildItem(PassRefPtr<HistoryItem>); 97 void addChildItem(PassRefPtr<HistoryItem>);
99 void setChildItem(PassRefPtr<HistoryItem>);
100 HistoryItem* childItemWithTarget(const String&) const;
101 HistoryItem* childItemWithDocumentSequenceNumber(long long number) const;
102 const HistoryItemVector& children() const; 98 const HistoryItemVector& children() const;
103 void clearChildren(); 99 void clearChildren();
104 100
105 bool shouldDoSameDocumentNavigationTo(HistoryItem* otherItem) const;
106 bool hasSameFrames(HistoryItem* otherItem) const;
107
108 bool isCurrentDocument(Document*) const; 101 bool isCurrentDocument(Document*) const;
109 102
110 #ifndef NDEBUG
111 int showTree() const;
112 int showTreeWithIndent(unsigned indentLevel) const;
113 #endif
114
115 private: 103 private:
116 HistoryItem(); 104 HistoryItem();
117 explicit HistoryItem(const HistoryItem&); 105 explicit HistoryItem(const HistoryItem&);
118 106
119 bool hasSameDocumentTree(HistoryItem* otherItem) const;
120
121 String m_urlString; 107 String m_urlString;
122 String m_originalURLString; 108 String m_originalURLString;
123 String m_referrer; 109 String m_referrer;
124 String m_target; 110 String m_target;
125 111
126 IntPoint m_scrollPoint; 112 IntPoint m_scrollPoint;
127 float m_pageScaleFactor; 113 float m_pageScaleFactor;
128 Vector<String> m_documentState; 114 Vector<String> m_documentState;
129 115
130 HistoryItemVector m_children; 116 HistoryItemVector m_children;
(...skipping 13 matching lines...) Expand all
144 RefPtr<SerializedScriptValue> m_stateObject; 130 RefPtr<SerializedScriptValue> m_stateObject;
145 131
146 // info used to repost form data 132 // info used to repost form data
147 RefPtr<FormData> m_formData; 133 RefPtr<FormData> m_formData;
148 String m_formContentType; 134 String m_formContentType;
149 135
150 }; //class HistoryItem 136 }; //class HistoryItem
151 137
152 } //namespace WebCore 138 } //namespace WebCore
153 139
154 #ifndef NDEBUG
155 // Outside the WebCore namespace for ease of invocation from gdb.
156 extern "C" int showTree(const WebCore::HistoryItem*);
157 #endif
158
159 #endif // HISTORYITEM_H 140 #endif // HISTORYITEM_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698