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