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 #include "content/browser/frame_host/navigation_entry_impl.h" | 5 #include "content/browser/frame_host/navigation_entry_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // TODO(creis): Share FNEs unless it's for another tab. | 122 // TODO(creis): Share FNEs unless it's for another tab. |
123 scoped_ptr<NavigationEntryImpl::TreeNode> copy( | 123 scoped_ptr<NavigationEntryImpl::TreeNode> copy( |
124 new NavigationEntryImpl::TreeNode(frame_entry->Clone())); | 124 new NavigationEntryImpl::TreeNode(frame_entry->Clone())); |
125 | 125 |
126 // Recursively clone the children. | 126 // Recursively clone the children. |
127 for (auto& child : children) { | 127 for (auto& child : children) { |
128 copy->children.push_back( | 128 copy->children.push_back( |
129 child->CloneAndReplace(frame_tree_node, frame_navigation_entry)); | 129 child->CloneAndReplace(frame_tree_node, frame_navigation_entry)); |
130 } | 130 } |
131 | 131 |
132 return copy.Pass(); | 132 return copy; |
133 } | 133 } |
134 | 134 |
135 scoped_ptr<NavigationEntry> NavigationEntry::Create() { | 135 scoped_ptr<NavigationEntry> NavigationEntry::Create() { |
136 return make_scoped_ptr(new NavigationEntryImpl()).Pass(); | 136 return make_scoped_ptr(new NavigationEntryImpl()); |
137 } | 137 } |
138 | 138 |
139 NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( | 139 NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( |
140 NavigationEntry* entry) { | 140 NavigationEntry* entry) { |
141 return static_cast<NavigationEntryImpl*>(entry); | 141 return static_cast<NavigationEntryImpl*>(entry); |
142 } | 142 } |
143 | 143 |
144 const NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( | 144 const NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( |
145 const NavigationEntry* entry) { | 145 const NavigationEntry* entry) { |
146 return static_cast<const NavigationEntryImpl*>(entry); | 146 return static_cast<const NavigationEntryImpl*>(entry); |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 // ResetForCommit: is_renderer_initiated_ | 547 // ResetForCommit: is_renderer_initiated_ |
548 copy->cached_display_title_ = cached_display_title_; | 548 copy->cached_display_title_ = cached_display_title_; |
549 // ResetForCommit: transferred_global_request_id_ | 549 // ResetForCommit: transferred_global_request_id_ |
550 // ResetForCommit: should_replace_entry_ | 550 // ResetForCommit: should_replace_entry_ |
551 copy->redirect_chain_ = redirect_chain_; | 551 copy->redirect_chain_ = redirect_chain_; |
552 // ResetForCommit: should_clear_history_list_ | 552 // ResetForCommit: should_clear_history_list_ |
553 // ResetForCommit: frame_tree_node_id_ | 553 // ResetForCommit: frame_tree_node_id_ |
554 // ResetForCommit: intent_received_timestamp_ | 554 // ResetForCommit: intent_received_timestamp_ |
555 copy->extra_data_ = extra_data_; | 555 copy->extra_data_ = extra_data_; |
556 | 556 |
557 return copy.Pass(); | 557 return copy; |
558 } | 558 } |
559 | 559 |
560 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( | 560 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( |
561 const GURL& dest_url, | 561 const GURL& dest_url, |
562 const Referrer& dest_referrer, | 562 const Referrer& dest_referrer, |
563 const FrameNavigationEntry& frame_entry, | 563 const FrameNavigationEntry& frame_entry, |
564 FrameMsg_Navigate_Type::Value navigation_type, | 564 FrameMsg_Navigate_Type::Value navigation_type, |
565 LoFiState lofi_state, | 565 LoFiState lofi_state, |
566 const base::TimeTicks& navigation_start) const { | 566 const base::TimeTicks& navigation_start) const { |
567 FrameMsg_UILoadMetricsReportType::Value report_type = | 567 FrameMsg_UILoadMetricsReportType::Value report_type = |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 return node; | 764 return node; |
765 } | 765 } |
766 // Enqueue any children and keep looking. | 766 // Enqueue any children and keep looking. |
767 for (auto& child : node->children) | 767 for (auto& child : node->children) |
768 work_queue.push(child); | 768 work_queue.push(child); |
769 } | 769 } |
770 return nullptr; | 770 return nullptr; |
771 } | 771 } |
772 | 772 |
773 } // namespace content | 773 } // namespace content |
OLD | NEW |