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/devtools/render_frame_devtools_agent_host.h" | |
| 9 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| 10 #include "content/browser/frame_host/frame_tree_node.h" | 11 #include "content/browser/frame_host/frame_tree_node.h" |
| 11 #include "content/browser/frame_host/navigation_controller_impl.h" | 12 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 12 #include "content/browser/frame_host/navigation_handle_impl.h" | 13 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 13 #include "content/browser/frame_host/navigation_request_info.h" | 14 #include "content/browser/frame_host/navigation_request_info.h" |
| 14 #include "content/browser/frame_host/navigator.h" | 15 #include "content/browser/frame_host/navigator.h" |
| 15 #include "content/browser/loader/navigation_url_loader.h" | 16 #include "content/browser/loader/navigation_url_loader.h" |
| 16 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 17 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 17 #include "content/browser/service_worker/service_worker_navigation_handle.h" | 18 #include "content/browser/service_worker/service_worker_navigation_handle.h" |
| 18 #include "content/browser/site_instance_impl.h" | 19 #include "content/browser/site_instance_impl.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 parent_is_main_frame, frame_tree_node->frame_tree_node_id(), body)); | 199 parent_is_main_frame, frame_tree_node->frame_tree_node_id(), body)); |
| 199 } | 200 } |
| 200 | 201 |
| 201 NavigationRequest::~NavigationRequest() { | 202 NavigationRequest::~NavigationRequest() { |
| 202 } | 203 } |
| 203 | 204 |
| 204 void NavigationRequest::BeginNavigation() { | 205 void NavigationRequest::BeginNavigation() { |
| 205 DCHECK(!loader_); | 206 DCHECK(!loader_); |
| 206 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE); | 207 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE); |
| 207 state_ = STARTED; | 208 state_ = STARTED; |
| 209 RenderFrameDevToolsAgentHost::OnBeforeNavigation(navigation_handle_.get()); | |
|
dgozman
2016/02/25 18:11:24
So, with PlzNavigate we do not ever send FrameMsg_
clamy
2016/03/02 12:33:50
Yes we never send FrameMsg_Navigate. The place her
| |
| 208 | 210 |
| 209 if (ShouldMakeNetworkRequestForURL(common_params_.url)) { | 211 if (ShouldMakeNetworkRequestForURL(common_params_.url)) { |
| 210 // It's safe to use base::Unretained because this NavigationRequest owns | 212 // It's safe to use base::Unretained because this NavigationRequest owns |
| 211 // the NavigationHandle where the callback will be stored. | 213 // the NavigationHandle where the callback will be stored. |
| 212 // TODO(clamy): pass the real value for |is_external_protocol| if needed. | 214 // TODO(clamy): pass the real value for |is_external_protocol| if needed. |
| 213 navigation_handle_->WillStartRequest( | 215 navigation_handle_->WillStartRequest( |
| 214 begin_params_.method == "POST", | 216 begin_params_.method == "POST", |
| 215 Referrer::SanitizeForRequest(common_params_.url, | 217 Referrer::SanitizeForRequest(common_params_.url, |
| 216 common_params_.referrer), | 218 common_params_.referrer), |
| 217 begin_params_.has_user_gesture, common_params_.transition, false, | 219 begin_params_.has_user_gesture, common_params_.transition, false, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 365 browser_context, navigating_frame_host->GetSiteInstance()); | 367 browser_context, navigating_frame_host->GetSiteInstance()); |
| 366 DCHECK(partition); | 368 DCHECK(partition); |
| 367 | 369 |
| 368 ServiceWorkerContextWrapper* service_worker_context = | 370 ServiceWorkerContextWrapper* service_worker_context = |
| 369 static_cast<ServiceWorkerContextWrapper*>( | 371 static_cast<ServiceWorkerContextWrapper*>( |
| 370 partition->GetServiceWorkerContext()); | 372 partition->GetServiceWorkerContext()); |
| 371 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 373 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| 372 } | 374 } |
| 373 | 375 |
| 374 } // namespace content | 376 } // namespace content |
| OLD | NEW |