Chromium Code Reviews| 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 } | 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() { |
| 230 navigation_handle_ = NavigationHandleImpl::Create( | 230 // TODO(nasko): Update the NavigationHandle creation to ensure that the |
| 231 common_params_.url, frame_tree_node_, common_params_.navigation_start); | 231 // proper values are specified for is_synchronous and is_srcdoc. |
| 232 navigation_handle_ = | |
| 233 NavigationHandleImpl::Create(common_params_.url, frame_tree_node_, | |
| 234 false, // is_synchronous | |
|
clamy
2016/02/08 12:54:58
Can a browser-initiated nav count as synchronous?
nasko
2016/02/08 16:58:55
I don't think we can equivalate no network request
clamy
2016/02/09 10:45:25
Acknowledged for the first concern.
For the secon
| |
| 235 false, // is_srcdoc | |
| 236 common_params_.navigation_start); | |
| 232 } | 237 } |
| 233 | 238 |
| 234 void NavigationRequest::TransferNavigationHandleOwnership( | 239 void NavigationRequest::TransferNavigationHandleOwnership( |
| 235 RenderFrameHostImpl* render_frame_host) { | 240 RenderFrameHostImpl* render_frame_host) { |
| 236 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); | 241 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); |
| 237 } | 242 } |
| 238 | 243 |
| 239 void NavigationRequest::OnRequestRedirected( | 244 void NavigationRequest::OnRequestRedirected( |
| 240 const net::RedirectInfo& redirect_info, | 245 const net::RedirectInfo& redirect_info, |
| 241 const scoped_refptr<ResourceResponse>& response) { | 246 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()); | 359 browser_context, navigating_frame_host->GetSiteInstance()); |
| 355 DCHECK(partition); | 360 DCHECK(partition); |
| 356 | 361 |
| 357 ServiceWorkerContextWrapper* service_worker_context = | 362 ServiceWorkerContextWrapper* service_worker_context = |
| 358 static_cast<ServiceWorkerContextWrapper*>( | 363 static_cast<ServiceWorkerContextWrapper*>( |
| 359 partition->GetServiceWorkerContext()); | 364 partition->GetServiceWorkerContext()); |
| 360 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 365 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| 361 } | 366 } |
| 362 | 367 |
| 363 } // namespace content | 368 } // namespace content |
| OLD | NEW |