Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 // the destination render frame will take ownership, so release ownership of | 289 // the destination render frame will take ownership, so release ownership of |
| 290 // the request. | 290 // the request. |
| 291 if (cross_site_transferring_request_.get() && | 291 if (cross_site_transferring_request_.get() && |
| 292 cross_site_transferring_request_->request_id() == | 292 cross_site_transferring_request_->request_id() == |
| 293 entry.transferred_global_request_id()) { | 293 entry.transferred_global_request_id()) { |
| 294 cross_site_transferring_request_->ReleaseRequest(); | 294 cross_site_transferring_request_->ReleaseRequest(); |
| 295 | 295 |
| 296 // The navigating RenderFrameHost should take ownership of the | 296 // The navigating RenderFrameHost should take ownership of the |
| 297 // NavigationHandle that came from the transferring RenderFrameHost. | 297 // NavigationHandle that came from the transferring RenderFrameHost. |
| 298 DCHECK(transfer_navigation_handle_); | 298 DCHECK(transfer_navigation_handle_); |
| 299 // Update the pending NavigationEntry ID on the handle as well. | |
|
nasko
2016/03/11 17:10:06
nit: Empty line before the comment makes it a bit
Charlie Reis
2016/03/11 20:12:48
Done.
| |
| 300 // TODO(creis): Make this line unnecessary by avoiding having a pending | |
| 301 // entry for transfer navigations. See https://crbug.com/495161. | |
| 302 transfer_navigation_handle_->set_pending_nav_entry_id(entry.GetUniqueID()); | |
| 299 dest_render_frame_host->SetNavigationHandle( | 303 dest_render_frame_host->SetNavigationHandle( |
| 300 std::move(transfer_navigation_handle_)); | 304 std::move(transfer_navigation_handle_)); |
| 301 } | 305 } |
| 302 DCHECK(!transfer_navigation_handle_); | 306 DCHECK(!transfer_navigation_handle_); |
| 303 | 307 |
| 304 return dest_render_frame_host; | 308 return dest_render_frame_host; |
| 305 } | 309 } |
| 306 | 310 |
| 307 void RenderFrameHostManager::Stop() { | 311 void RenderFrameHostManager::Stop() { |
| 308 render_frame_host_->Stop(); | 312 render_frame_host_->Stop(); |
| (...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2540 } else if (pending_render_frame_host_) { | 2544 } else if (pending_render_frame_host_) { |
| 2541 send_msg(pending_render_frame_host_.get(), | 2545 send_msg(pending_render_frame_host_.get(), |
| 2542 pending_render_frame_host_->GetRoutingID(), msg); | 2546 pending_render_frame_host_->GetRoutingID(), msg); |
| 2543 } | 2547 } |
| 2544 | 2548 |
| 2545 msg->set_routing_id(render_frame_host_->GetRoutingID()); | 2549 msg->set_routing_id(render_frame_host_->GetRoutingID()); |
| 2546 render_frame_host_->Send(msg); | 2550 render_frame_host_->Send(msg); |
| 2547 } | 2551 } |
| 2548 | 2552 |
| 2549 } // namespace content | 2553 } // namespace content |
| OLD | NEW |