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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 common_params_.url); | 228 common_params_.url); |
229 | 229 |
230 // Inform the NavigationHandle that the navigation will commit. | 230 // Inform the NavigationHandle that the navigation will commit. |
231 navigation_handle_->ReadyToCommitNavigation(render_frame_host); | 231 navigation_handle_->ReadyToCommitNavigation(render_frame_host); |
232 | 232 |
233 CommitNavigation(); | 233 CommitNavigation(); |
234 } | 234 } |
235 | 235 |
236 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) { | 236 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) { |
237 // TODO(nasko): Update the NavigationHandle creation to ensure that the | 237 // TODO(nasko): Update the NavigationHandle creation to ensure that the |
238 // proper values are specified for is_synchronous and is_srcdoc. | 238 // proper values are specified for is_same_page and is_srcdoc. |
239 navigation_handle_ = NavigationHandleImpl::Create( | 239 navigation_handle_ = NavigationHandleImpl::Create( |
240 common_params_.url, frame_tree_node_, | 240 common_params_.url, frame_tree_node_, !browser_initiated_, |
241 !browser_initiated_, | 241 false, // is_same_page |
242 false, // is_synchronous | |
243 false, // is_srcdoc | 242 false, // is_srcdoc |
244 common_params_.navigation_start, pending_nav_entry_id); | 243 common_params_.navigation_start, pending_nav_entry_id); |
245 } | 244 } |
246 | 245 |
247 void NavigationRequest::TransferNavigationHandleOwnership( | 246 void NavigationRequest::TransferNavigationHandleOwnership( |
248 RenderFrameHostImpl* render_frame_host) { | 247 RenderFrameHostImpl* render_frame_host) { |
249 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); | 248 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); |
250 } | 249 } |
251 | 250 |
252 void NavigationRequest::OnRequestRedirected( | 251 void NavigationRequest::OnRequestRedirected( |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 470 |
472 TransferNavigationHandleOwnership(render_frame_host); | 471 TransferNavigationHandleOwnership(render_frame_host); |
473 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 472 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
474 common_params_, request_params_, | 473 common_params_, request_params_, |
475 is_view_source_); | 474 is_view_source_); |
476 | 475 |
477 frame_tree_node_->ResetNavigationRequest(true); | 476 frame_tree_node_->ResetNavigationRequest(true); |
478 } | 477 } |
479 | 478 |
480 } // namespace content | 479 } // namespace content |
OLD | NEW |