OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 return frame_tree_.get(); | 165 return frame_tree_.get(); |
166 } | 166 } |
167 | 167 |
168 // Finds the TreeNode associated with |frame_tree_node_id| to add or update | 168 // Finds the TreeNode associated with |frame_tree_node_id| to add or update |
169 // its FrameNavigationEntry. A new FrameNavigationEntry is added if none | 169 // its FrameNavigationEntry. A new FrameNavigationEntry is added if none |
170 // exists, or else the existing one (which might be shared with other | 170 // exists, or else the existing one (which might be shared with other |
171 // NavigationEntries) is updated with the given parameters. | 171 // NavigationEntries) is updated with the given parameters. |
172 // Does nothing if there is no entry already and |url| is about:blank, since | 172 // Does nothing if there is no entry already and |url| is about:blank, since |
173 // that does not count as a real commit. | 173 // that does not count as a real commit. |
174 void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node, | 174 void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node, |
| 175 int64 item_sequence_number, |
| 176 int64 document_sequence_number, |
175 SiteInstanceImpl* site_instance, | 177 SiteInstanceImpl* site_instance, |
176 const GURL& url, | 178 const GURL& url, |
177 const Referrer& referrer, | 179 const Referrer& referrer, |
178 const PageState& page_state); | 180 const PageState& page_state); |
179 | 181 |
180 // Returns whether this entry has a FrameNavigationEntry for the given | 182 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if |
181 // |frame_tree_node|. | 183 // there is one in this NavigationEntry. |
182 bool HasFrameEntry(FrameTreeNode* frame_tree_node) const; | 184 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; |
183 | 185 |
184 void set_unique_id(int unique_id) { | 186 void set_unique_id(int unique_id) { |
185 unique_id_ = unique_id; | 187 unique_id_ = unique_id; |
186 } | 188 } |
187 | 189 |
188 // The SiteInstance represents which pages must share processes. This is a | 190 // The SiteInstance represents which pages must share processes. This is a |
189 // reference counted pointer to a shared SiteInstance. | 191 // reference counted pointer to a shared SiteInstance. |
190 // | 192 // |
191 // Note that the SiteInstance should usually not be changed after it is set, | 193 // Note that the SiteInstance should usually not be changed after it is set, |
192 // but this may happen if the NavigationEntry was cloned and needs to use a | 194 // but this may happen if the NavigationEntry was cloned and needs to use a |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 // persisted, unless specific data is taken out/put back in at save/restore | 459 // persisted, unless specific data is taken out/put back in at save/restore |
458 // time (see TabNavigation for an example of this). | 460 // time (see TabNavigation for an example of this). |
459 std::map<std::string, base::string16> extra_data_; | 461 std::map<std::string, base::string16> extra_data_; |
460 | 462 |
461 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 463 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
462 }; | 464 }; |
463 | 465 |
464 } // namespace content | 466 } // namespace content |
465 | 467 |
466 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 468 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |