| 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, |
| 187 bool has_committed_real_load, | 188 bool has_committed_real_load, |
| 188 bool intended_as_new_entry, | 189 bool intended_as_new_entry, |
| 189 int pending_offset_to_send, | 190 int pending_offset_to_send, |
| 190 int current_offset_to_send, | 191 int current_offset_to_send, |
| 191 int current_length_to_send) const; | 192 int current_length_to_send) const; |
| 192 | 193 |
| 193 // Once a navigation entry is committed, we should no longer track several | 194 // Once a navigation entry is committed, we should no longer track several |
| 194 // pieces of non-persisted state, as documented on the members below. | 195 // pieces of non-persisted state, as documented on the members below. |
| 195 // |frame_entry| is the FrameNavigationEntry for the frame that committed | 196 // |frame_entry| is the FrameNavigationEntry for the frame that committed |
| 196 // the navigation. It can be null. | 197 // the navigation. It can be null. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 220 const GURL& url, | 221 const GURL& url, |
| 221 const Referrer& referrer, | 222 const Referrer& referrer, |
| 222 const PageState& page_state, | 223 const PageState& page_state, |
| 223 const std::string& method, | 224 const std::string& method, |
| 224 int64_t post_id); | 225 int64_t post_id); |
| 225 | 226 |
| 226 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if | 227 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if |
| 227 // there is one in this NavigationEntry. | 228 // there is one in this NavigationEntry. |
| 228 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; | 229 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; |
| 229 | 230 |
| 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 |
| 230 // Removes any subframe FrameNavigationEntries that match the unique name of | 240 // Removes any subframe FrameNavigationEntries that match the unique name of |
| 231 // |frame_tree_node|, and all of their children. There should be at most one, | 241 // |frame_tree_node|, and all of their children. There should be at most one, |
| 232 // since collisions are avoided but leave old FrameNavigationEntries in the | 242 // since collisions are avoided but leave old FrameNavigationEntries in the |
| 233 // tree after their frame has been detached. | 243 // tree after their frame has been detached. |
| 234 void ClearStaleFrameEntriesForNewFrame(FrameTreeNode* frame_tree_node); | 244 void ClearStaleFrameEntriesForNewFrame(FrameTreeNode* frame_tree_node); |
| 235 | 245 |
| 236 void set_unique_id(int unique_id) { | 246 void set_unique_id(int unique_id) { |
| 237 unique_id_ = unique_id; | 247 unique_id_ = unique_id; |
| 238 } | 248 } |
| 239 | 249 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 // persisted, unless specific data is taken out/put back in at save/restore | 532 // persisted, unless specific data is taken out/put back in at save/restore |
| 523 // time (see TabNavigation for an example of this). | 533 // time (see TabNavigation for an example of this). |
| 524 std::map<std::string, base::string16> extra_data_; | 534 std::map<std::string, base::string16> extra_data_; |
| 525 | 535 |
| 526 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 536 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
| 527 }; | 537 }; |
| 528 | 538 |
| 529 } // namespace content | 539 } // namespace content |
| 530 | 540 |
| 531 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 541 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |