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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 286 } |
287 | 287 |
288 // If entry includes the request ID of a request that is being transferred, | 288 // If entry includes the request ID of a request that is being transferred, |
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 DCHECK(transfer_navigation_handle_); |
| 297 |
| 298 // Update the pending NavigationEntry ID on the transferring handle. |
| 299 // TODO(creis): Make this line unnecessary by avoiding having a pending |
| 300 // entry for transfer navigations. See https://crbug.com/495161. |
| 301 transfer_navigation_handle_->update_entry_id_for_transfer( |
| 302 entry.GetUniqueID()); |
| 303 |
296 // The navigating RenderFrameHost should take ownership of the | 304 // The navigating RenderFrameHost should take ownership of the |
297 // NavigationHandle that came from the transferring RenderFrameHost. | 305 // NavigationHandle that came from the transferring RenderFrameHost. |
298 DCHECK(transfer_navigation_handle_); | |
299 dest_render_frame_host->SetNavigationHandle( | 306 dest_render_frame_host->SetNavigationHandle( |
300 std::move(transfer_navigation_handle_)); | 307 std::move(transfer_navigation_handle_)); |
301 } | 308 } |
302 DCHECK(!transfer_navigation_handle_); | 309 DCHECK(!transfer_navigation_handle_); |
303 | 310 |
304 return dest_render_frame_host; | 311 return dest_render_frame_host; |
305 } | 312 } |
306 | 313 |
307 void RenderFrameHostManager::Stop() { | 314 void RenderFrameHostManager::Stop() { |
308 render_frame_host_->Stop(); | 315 render_frame_host_->Stop(); |
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 } else if (pending_render_frame_host_) { | 2547 } else if (pending_render_frame_host_) { |
2541 send_msg(pending_render_frame_host_.get(), | 2548 send_msg(pending_render_frame_host_.get(), |
2542 pending_render_frame_host_->GetRoutingID(), msg); | 2549 pending_render_frame_host_->GetRoutingID(), msg); |
2543 } | 2550 } |
2544 | 2551 |
2545 msg->set_routing_id(render_frame_host_->GetRoutingID()); | 2552 msg->set_routing_id(render_frame_host_->GetRoutingID()); |
2546 render_frame_host_->Send(msg); | 2553 render_frame_host_->Send(msg); |
2547 } | 2554 } |
2548 | 2555 |
2549 } // namespace content | 2556 } // namespace content |
OLD | NEW |