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 "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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 // There is no need to make a network request for this navigation, so commit | 212 // There is no need to make a network request for this navigation, so commit |
213 // it immediately. | 213 // it immediately. |
214 state_ = RESPONSE_STARTED; | 214 state_ = RESPONSE_STARTED; |
215 frame_tree_node_->navigator()->CommitNavigation( | 215 frame_tree_node_->navigator()->CommitNavigation( |
216 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); | 216 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); |
217 } | 217 } |
218 | 218 |
219 void NavigationRequest::CreateNavigationHandle() { | 219 void NavigationRequest::CreateNavigationHandle() { |
220 navigation_handle_ = NavigationHandleImpl::Create( | 220 navigation_handle_ = NavigationHandleImpl::Create( |
221 common_params_.url, frame_tree_node_); | 221 common_params_.url, frame_tree_node_, common_params_.navigation_start); |
222 } | 222 } |
223 | 223 |
224 void NavigationRequest::TransferNavigationHandleOwnership( | 224 void NavigationRequest::TransferNavigationHandleOwnership( |
225 RenderFrameHostImpl* render_frame_host) { | 225 RenderFrameHostImpl* render_frame_host) { |
226 render_frame_host->SetNavigationHandle(navigation_handle_.Pass()); | 226 render_frame_host->SetNavigationHandle(navigation_handle_.Pass()); |
227 render_frame_host->navigation_handle()->ReadyToCommitNavigation( | 227 render_frame_host->navigation_handle()->ReadyToCommitNavigation( |
228 render_frame_host); | 228 render_frame_host); |
229 } | 229 } |
230 | 230 |
231 void NavigationRequest::OnRequestRedirected( | 231 void NavigationRequest::OnRequestRedirected( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { | 305 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { |
306 frame_tree_node_->ResetNavigationRequest(false); | 306 frame_tree_node_->ResetNavigationRequest(false); |
307 return; | 307 return; |
308 } | 308 } |
309 | 309 |
310 loader_->FollowRedirect(); | 310 loader_->FollowRedirect(); |
311 navigation_handle_->DidRedirectNavigation(common_params_.url); | 311 navigation_handle_->DidRedirectNavigation(common_params_.url); |
312 } | 312 } |
313 | 313 |
314 } // namespace content | 314 } // namespace content |
OLD | NEW |