Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 1425823002: (DEPRECATED) Send navigation_start to browser process in DidStartProvisionalLoad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Name change + blink layering Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/frame_host/frame_tree_node.h" 8 #include "content/browser/frame_host/frame_tree_node.h"
9 #include "content/browser/frame_host/navigation_controller_impl.h" 9 #include "content/browser/frame_host/navigation_controller_impl.h"
10 #include "content/browser/frame_host/navigation_handle_impl.h" 10 #include "content/browser/frame_host/navigation_handle_impl.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest( 88 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest(
89 frame_tree_node, 89 frame_tree_node,
90 entry.ConstructCommonNavigationParams(dest_url, dest_referrer, 90 entry.ConstructCommonNavigationParams(dest_url, dest_referrer,
91 frame_entry, navigation_type, 91 frame_entry, navigation_type,
92 LOFI_UNSPECIFIED), 92 LOFI_UNSPECIFIED),
93 BeginNavigationParams(method, headers.ToString(), 93 BeginNavigationParams(method, headers.ToString(),
94 LoadFlagFromNavigationType(navigation_type), 94 LoadFlagFromNavigationType(navigation_type),
95 false, // has_user_gestures 95 false, // has_user_gestures
96 false, // skip_service_worker 96 false, // skip_service_worker
97 REQUEST_CONTEXT_TYPE_LOCATION), 97 REQUEST_CONTEXT_TYPE_LOCATION,
98 0 /* renderer_navigation_start */),
98 entry.ConstructRequestNavigationParams( 99 entry.ConstructRequestNavigationParams(
99 frame_entry, navigation_start, is_same_document_history_load, 100 frame_entry, navigation_start, is_same_document_history_load,
100 frame_tree_node->has_committed_real_load(), 101 frame_tree_node->has_committed_real_load(),
101 controller->GetPendingEntryIndex() == -1, 102 controller->GetPendingEntryIndex() == -1,
102 controller->GetIndexOfEntry(&entry), 103 controller->GetIndexOfEntry(&entry),
103 controller->GetLastCommittedEntryIndex(), 104 controller->GetLastCommittedEntryIndex(),
104 controller->GetEntryCount()), 105 controller->GetEntryCount()),
105 request_body, true, &frame_entry, &entry)); 106 request_body, true, &frame_entry, &entry));
106 return navigation_request.Pass(); 107 return navigation_request.Pass();
107 } 108 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return; 211 return;
211 } 212 }
212 213
213 // There is no need to make a network request for this navigation, so commit 214 // There is no need to make a network request for this navigation, so commit
214 // it immediately. 215 // it immediately.
215 state_ = RESPONSE_STARTED; 216 state_ = RESPONSE_STARTED;
216 frame_tree_node_->navigator()->CommitNavigation( 217 frame_tree_node_->navigator()->CommitNavigation(
217 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); 218 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>());
218 } 219 }
219 220
220 void NavigationRequest::CreateNavigationHandle() { 221 void NavigationRequest::CreateNavigationHandle(double navigation_start) {
221 navigation_handle_ = NavigationHandleImpl::Create( 222 navigation_handle_ = NavigationHandleImpl::Create(
222 common_params_.url, frame_tree_node_); 223 common_params_.url, frame_tree_node_, navigation_start);
223 } 224 }
224 225
225 void NavigationRequest::TransferNavigationHandleOwnership( 226 void NavigationRequest::TransferNavigationHandleOwnership(
226 RenderFrameHostImpl* render_frame_host) { 227 RenderFrameHostImpl* render_frame_host) {
227 render_frame_host->SetNavigationHandle(navigation_handle_.Pass()); 228 render_frame_host->SetNavigationHandle(navigation_handle_.Pass());
228 render_frame_host->navigation_handle()->ReadyToCommitNavigation( 229 render_frame_host->navigation_handle()->ReadyToCommitNavigation(
229 render_frame_host); 230 render_frame_host);
230 } 231 }
231 232
232 void NavigationRequest::OnRequestRedirected( 233 void NavigationRequest::OnRequestRedirected(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { 307 if (result == NavigationThrottle::CANCEL_AND_IGNORE) {
307 frame_tree_node_->ResetNavigationRequest(false); 308 frame_tree_node_->ResetNavigationRequest(false);
308 return; 309 return;
309 } 310 }
310 311
311 loader_->FollowRedirect(); 312 loader_->FollowRedirect();
312 navigation_handle_->DidRedirectNavigation(common_params_.url); 313 navigation_handle_->DidRedirectNavigation(common_params_.url);
313 } 314 }
314 315
315 } // namespace content 316 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698