| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 return; | 219 return; |
| 220 } | 220 } |
| 221 | 221 |
| 222 // There is no need to make a network request for this navigation, so commit | 222 // There is no need to make a network request for this navigation, so commit |
| 223 // it immediately. | 223 // it immediately. |
| 224 state_ = RESPONSE_STARTED; | 224 state_ = RESPONSE_STARTED; |
| 225 frame_tree_node_->navigator()->CommitNavigation( | 225 frame_tree_node_->navigator()->CommitNavigation( |
| 226 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); | 226 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void NavigationRequest::CreateNavigationHandle() { | 229 void NavigationRequest::CreateNavigationHandle(const NavigationEntry* entry) { |
| 230 navigation_handle_ = NavigationHandleImpl::Create( | 230 navigation_handle_ = |
| 231 common_params_.url, frame_tree_node_, common_params_.navigation_start); | 231 NavigationHandleImpl::Create(common_params_.url, frame_tree_node_, |
| 232 common_params_.navigation_start, entry); |
| 232 } | 233 } |
| 233 | 234 |
| 234 void NavigationRequest::TransferNavigationHandleOwnership( | 235 void NavigationRequest::TransferNavigationHandleOwnership( |
| 235 RenderFrameHostImpl* render_frame_host) { | 236 RenderFrameHostImpl* render_frame_host) { |
| 236 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); | 237 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); |
| 237 } | 238 } |
| 238 | 239 |
| 239 void NavigationRequest::OnRequestRedirected( | 240 void NavigationRequest::OnRequestRedirected( |
| 240 const net::RedirectInfo& redirect_info, | 241 const net::RedirectInfo& redirect_info, |
| 241 const scoped_refptr<ResourceResponse>& response) { | 242 const scoped_refptr<ResourceResponse>& response) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 browser_context, navigating_frame_host->GetSiteInstance()); | 355 browser_context, navigating_frame_host->GetSiteInstance()); |
| 355 DCHECK(partition); | 356 DCHECK(partition); |
| 356 | 357 |
| 357 ServiceWorkerContextWrapper* service_worker_context = | 358 ServiceWorkerContextWrapper* service_worker_context = |
| 358 static_cast<ServiceWorkerContextWrapper*>( | 359 static_cast<ServiceWorkerContextWrapper*>( |
| 359 partition->GetServiceWorkerContext()); | 360 partition->GetServiceWorkerContext()); |
| 360 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 361 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| 361 } | 362 } |
| 362 | 363 |
| 363 } // namespace content | 364 } // namespace content |
| OLD | NEW |