| 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/devtools/render_frame_devtools_agent_host.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // Select an appropriate renderer to commit the navigation. | 352 // Select an appropriate renderer to commit the navigation. |
| 353 RenderFrameHostImpl* render_frame_host = | 353 RenderFrameHostImpl* render_frame_host = |
| 354 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); | 354 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); |
| 355 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, | 355 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, |
| 356 common_params_.url); | 356 common_params_.url); |
| 357 | 357 |
| 358 // For renderer-initiated navigations that are set to commit in a different | 358 // For renderer-initiated navigations that are set to commit in a different |
| 359 // renderer, allow the embedder to cancel the transfer. | 359 // renderer, allow the embedder to cancel the transfer. |
| 360 if (!browser_initiated_ && | 360 if (!browser_initiated_ && |
| 361 render_frame_host != frame_tree_node_->current_frame_host() && | 361 render_frame_host != frame_tree_node_->current_frame_host() && |
| 362 !frame_tree_node_->navigator()->GetDelegate()->ShouldTransferNavigation( | 362 !frame_tree_node_->navigator() |
| 363 frame_tree_node_->IsMainFrame())) { | 363 ->GetDelegate() |
| 364 ->ShouldTransferNavigation()) { |
| 364 frame_tree_node_->ResetNavigationRequest(false); | 365 frame_tree_node_->ResetNavigationRequest(false); |
| 365 return; | 366 return; |
| 366 } | 367 } |
| 367 | 368 |
| 368 if (navigation_data) | 369 if (navigation_data) |
| 369 navigation_handle_->set_navigation_data(std::move(navigation_data)); | 370 navigation_handle_->set_navigation_data(std::move(navigation_data)); |
| 370 | 371 |
| 371 // Store the response and the StreamHandle until checks have been processed. | 372 // Store the response and the StreamHandle until checks have been processed. |
| 372 response_ = response; | 373 response_ = response; |
| 373 body_ = std::move(body); | 374 body_ = std::move(body); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 515 |
| 515 TransferNavigationHandleOwnership(render_frame_host); | 516 TransferNavigationHandleOwnership(render_frame_host); |
| 516 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 517 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
| 517 common_params_, request_params_, | 518 common_params_, request_params_, |
| 518 is_view_source_); | 519 is_view_source_); |
| 519 | 520 |
| 520 frame_tree_node_->ResetNavigationRequest(true); | 521 frame_tree_node_->ResetNavigationRequest(true); |
| 521 } | 522 } |
| 522 | 523 |
| 523 } // namespace content | 524 } // namespace content |
| OLD | NEW |