OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_request.h" | 5 #include "content/browser/frame_host/navigation_request.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 frame_tree_node, entry.ConstructCommonNavigationParams( | 97 frame_tree_node, entry.ConstructCommonNavigationParams( |
98 frame_entry, request_body, dest_url, dest_referrer, | 98 frame_entry, request_body, dest_url, dest_referrer, |
99 navigation_type, lofi_state, navigation_start), | 99 navigation_type, lofi_state, navigation_start), |
100 BeginNavigationParams(headers.ToString(), net::LOAD_NORMAL, | 100 BeginNavigationParams(headers.ToString(), net::LOAD_NORMAL, |
101 false, // has_user_gestures | 101 false, // has_user_gestures |
102 false, // skip_service_worker | 102 false, // skip_service_worker |
103 REQUEST_CONTEXT_TYPE_LOCATION), | 103 REQUEST_CONTEXT_TYPE_LOCATION), |
104 entry.ConstructRequestNavigationParams( | 104 entry.ConstructRequestNavigationParams( |
105 frame_entry, is_same_document_history_load, | 105 frame_entry, is_same_document_history_load, |
106 is_history_navigation_in_new_child, | 106 is_history_navigation_in_new_child, |
107 entry.HasSubtreeHistoryItems(frame_tree_node), | |
107 frame_tree_node->has_committed_real_load(), | 108 frame_tree_node->has_committed_real_load(), |
108 controller->GetPendingEntryIndex() == -1, | 109 controller->GetPendingEntryIndex() == -1, |
109 controller->GetIndexOfEntry(&entry), | 110 controller->GetIndexOfEntry(&entry), |
110 controller->GetLastCommittedEntryIndex(), | 111 controller->GetLastCommittedEntryIndex(), |
111 controller->GetEntryCount()), | 112 controller->GetEntryCount()), |
112 true, &frame_entry, &entry)); | 113 true, &frame_entry, &entry)); |
113 return navigation_request; | 114 return navigation_request; |
114 } | 115 } |
115 | 116 |
116 // static | 117 // static |
(...skipping 12 matching lines...) Expand all Loading... | |
129 RequestNavigationParams request_params( | 130 RequestNavigationParams request_params( |
130 false, // is_overriding_user_agent | 131 false, // is_overriding_user_agent |
131 std::vector<GURL>(), // redirects | 132 std::vector<GURL>(), // redirects |
132 false, // can_load_local_resources | 133 false, // can_load_local_resources |
133 base::Time::Now(), // request_time | 134 base::Time::Now(), // request_time |
134 PageState(), // page_state | 135 PageState(), // page_state |
135 -1, // page_id | 136 -1, // page_id |
136 0, // nav_entry_id | 137 0, // nav_entry_id |
137 false, // is_same_document_history_load | 138 false, // is_same_document_history_load |
138 false, // is_history_navigation_in_new_child | 139 false, // is_history_navigation_in_new_child |
140 false, // has_subtree_history_items | |
alexmos
2016/09/22 01:44:06
Just for my own understanding: why can we assume t
Charlie Reis
2016/09/22 21:00:37
Good question, and yes. Renderer-initiated histor
| |
139 frame_tree_node->has_committed_real_load(), | 141 frame_tree_node->has_committed_real_load(), |
140 false, // intended_as_new_entry | 142 false, // intended_as_new_entry |
141 -1, // pending_history_list_offset | 143 -1, // pending_history_list_offset |
142 current_history_list_offset, current_history_list_length, | 144 current_history_list_offset, current_history_list_length, |
143 false, // is_view_source | 145 false, // is_view_source |
144 false); // should_clear_history_list | 146 false); // should_clear_history_list |
145 std::unique_ptr<NavigationRequest> navigation_request( | 147 std::unique_ptr<NavigationRequest> navigation_request( |
146 new NavigationRequest(frame_tree_node, common_params, begin_params, | 148 new NavigationRequest(frame_tree_node, common_params, begin_params, |
147 request_params, false, nullptr, nullptr)); | 149 request_params, false, nullptr, nullptr)); |
148 return navigation_request; | 150 return navigation_request; |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 | 473 |
472 TransferNavigationHandleOwnership(render_frame_host); | 474 TransferNavigationHandleOwnership(render_frame_host); |
473 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 475 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
474 common_params_, request_params_, | 476 common_params_, request_params_, |
475 is_view_source_); | 477 is_view_source_); |
476 | 478 |
477 frame_tree_node_->ResetNavigationRequest(true); | 479 frame_tree_node_->ResetNavigationRequest(true); |
478 } | 480 } |
479 | 481 |
480 } // namespace content | 482 } // namespace content |
OLD | NEW |