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/frame_host/frame_tree.h" | 9 #include "content/browser/frame_host/frame_tree.h" |
10 #include "content/browser/frame_host/frame_tree_node.h" | 10 #include "content/browser/frame_host/frame_tree_node.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 return; | 220 return; |
221 } | 221 } |
222 | 222 |
223 // There is no need to make a network request for this navigation, so commit | 223 // There is no need to make a network request for this navigation, so commit |
224 // it immediately. | 224 // it immediately. |
225 state_ = RESPONSE_STARTED; | 225 state_ = RESPONSE_STARTED; |
226 frame_tree_node_->navigator()->CommitNavigation( | 226 frame_tree_node_->navigator()->CommitNavigation( |
227 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); | 227 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); |
228 } | 228 } |
229 | 229 |
230 void NavigationRequest::CreateNavigationHandle() { | 230 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) { |
231 // TODO(nasko): Update the NavigationHandle creation to ensure that the | 231 // TODO(nasko): Update the NavigationHandle creation to ensure that the |
232 // proper values are specified for is_synchronous and is_srcdoc. | 232 // proper values are specified for is_synchronous and is_srcdoc. |
233 navigation_handle_ = | 233 navigation_handle_ = |
234 NavigationHandleImpl::Create(common_params_.url, frame_tree_node_, | 234 NavigationHandleImpl::Create(common_params_.url, frame_tree_node_, |
235 false, // is_synchronous | 235 false, // is_synchronous |
236 false, // is_srcdoc | 236 false, // is_srcdoc |
237 common_params_.navigation_start); | 237 common_params_.navigation_start, |
| 238 pending_nav_entry_id); |
238 } | 239 } |
239 | 240 |
240 void NavigationRequest::TransferNavigationHandleOwnership( | 241 void NavigationRequest::TransferNavigationHandleOwnership( |
241 RenderFrameHostImpl* render_frame_host) { | 242 RenderFrameHostImpl* render_frame_host) { |
242 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); | 243 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); |
243 } | 244 } |
244 | 245 |
245 void NavigationRequest::OnRequestRedirected( | 246 void NavigationRequest::OnRequestRedirected( |
246 const net::RedirectInfo& redirect_info, | 247 const net::RedirectInfo& redirect_info, |
247 const scoped_refptr<ResourceResponse>& response) { | 248 const scoped_refptr<ResourceResponse>& response) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 browser_context, navigating_frame_host->GetSiteInstance()); | 366 browser_context, navigating_frame_host->GetSiteInstance()); |
366 DCHECK(partition); | 367 DCHECK(partition); |
367 | 368 |
368 ServiceWorkerContextWrapper* service_worker_context = | 369 ServiceWorkerContextWrapper* service_worker_context = |
369 static_cast<ServiceWorkerContextWrapper*>( | 370 static_cast<ServiceWorkerContextWrapper*>( |
370 partition->GetServiceWorkerContext()); | 371 partition->GetServiceWorkerContext()); |
371 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 372 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
372 } | 373 } |
373 | 374 |
374 } // namespace content | 375 } // namespace content |
OLD | NEW |