| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 const GURL& dest_url, | 178 const GURL& dest_url, |
| 179 const Referrer& dest_referrer, | 179 const Referrer& dest_referrer, |
| 180 FrameMsg_Navigate_Type::Value navigation_type, | 180 FrameMsg_Navigate_Type::Value navigation_type, |
| 181 LoFiState lofi_state, | 181 LoFiState lofi_state, |
| 182 const base::TimeTicks& navigation_start) const; | 182 const base::TimeTicks& navigation_start) const; |
| 183 StartNavigationParams ConstructStartNavigationParams() const; | 183 StartNavigationParams ConstructStartNavigationParams() const; |
| 184 RequestNavigationParams ConstructRequestNavigationParams( | 184 RequestNavigationParams ConstructRequestNavigationParams( |
| 185 const FrameNavigationEntry& frame_entry, | 185 const FrameNavigationEntry& frame_entry, |
| 186 bool is_same_document_history_load, | 186 bool is_same_document_history_load, |
| 187 bool is_history_navigation_in_new_child, | 187 bool is_history_navigation_in_new_child, |
| 188 bool has_subtree_history_items, |
| 188 bool has_committed_real_load, | 189 bool has_committed_real_load, |
| 189 bool intended_as_new_entry, | 190 bool intended_as_new_entry, |
| 190 int pending_offset_to_send, | 191 int pending_offset_to_send, |
| 191 int current_offset_to_send, | 192 int current_offset_to_send, |
| 192 int current_length_to_send) const; | 193 int current_length_to_send) const; |
| 193 | 194 |
| 194 // Once a navigation entry is committed, we should no longer track several | 195 // Once a navigation entry is committed, we should no longer track several |
| 195 // pieces of non-persisted state, as documented on the members below. | 196 // pieces of non-persisted state, as documented on the members below. |
| 196 // |frame_entry| is the FrameNavigationEntry for the frame that committed | 197 // |frame_entry| is the FrameNavigationEntry for the frame that committed |
| 197 // the navigation. It can be null. | 198 // the navigation. It can be null. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 221 const GURL& url, | 222 const GURL& url, |
| 222 const Referrer& referrer, | 223 const Referrer& referrer, |
| 223 const PageState& page_state, | 224 const PageState& page_state, |
| 224 const std::string& method, | 225 const std::string& method, |
| 225 int64_t post_id); | 226 int64_t post_id); |
| 226 | 227 |
| 227 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if | 228 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if |
| 228 // there is one in this NavigationEntry. | 229 // there is one in this NavigationEntry. |
| 229 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; | 230 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; |
| 230 | 231 |
| 232 // Returns whether the TreeNode associated with |frame_tree_node| has any |
| 233 // children. If not, the renderer process does not need to ask the browser |
| 234 // when new subframes are created during a back/forward navigation. |
| 235 // TODO(creis): Send a data structure with all unique names in the subtree, |
| 236 // along with any corresponding same-process PageStates. The renderer only |
| 237 // needs to ask the browser process to handle the cross-process cases. |
| 238 // See https://crbug.com/639842. |
| 239 bool HasSubtreeHistoryItems(FrameTreeNode* frame_tree_node) const; |
| 240 |
| 231 // Removes any subframe FrameNavigationEntries that match the unique name of | 241 // Removes any subframe FrameNavigationEntries that match the unique name of |
| 232 // |frame_tree_node|, and all of their children. There should be at most one, | 242 // |frame_tree_node|, and all of their children. There should be at most one, |
| 233 // since collisions are avoided but leave old FrameNavigationEntries in the | 243 // since collisions are avoided but leave old FrameNavigationEntries in the |
| 234 // tree after their frame has been detached. | 244 // tree after their frame has been detached. |
| 235 void ClearStaleFrameEntriesForNewFrame(FrameTreeNode* frame_tree_node); | 245 void ClearStaleFrameEntriesForNewFrame(FrameTreeNode* frame_tree_node); |
| 236 | 246 |
| 237 void set_unique_id(int unique_id) { | 247 void set_unique_id(int unique_id) { |
| 238 unique_id_ = unique_id; | 248 unique_id_ = unique_id; |
| 239 } | 249 } |
| 240 | 250 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 // persisted, unless specific data is taken out/put back in at save/restore | 519 // persisted, unless specific data is taken out/put back in at save/restore |
| 510 // time (see TabNavigation for an example of this). | 520 // time (see TabNavigation for an example of this). |
| 511 std::map<std::string, base::string16> extra_data_; | 521 std::map<std::string, base::string16> extra_data_; |
| 512 | 522 |
| 513 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 523 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
| 514 }; | 524 }; |
| 515 | 525 |
| 516 } // namespace content | 526 } // namespace content |
| 517 | 527 |
| 518 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 528 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |