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_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/metrics/user_metrics_action.h" | 10 #include "base/metrics/user_metrics_action.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 PageTransition page_transition, | 525 PageTransition page_transition, |
526 bool should_replace_current_entry) { | 526 bool should_replace_current_entry) { |
527 frame_tree_node_->render_manager()->OnCrossSiteResponse( | 527 frame_tree_node_->render_manager()->OnCrossSiteResponse( |
528 this, global_request_id, cross_site_transferring_request.Pass(), | 528 this, global_request_id, cross_site_transferring_request.Pass(), |
529 transfer_url_chain, referrer, page_transition, | 529 transfer_url_chain, referrer, page_transition, |
530 should_replace_current_entry); | 530 should_replace_current_entry); |
531 } | 531 } |
532 | 532 |
533 void RenderFrameHostImpl::OnDeferredAfterResponseStarted( | 533 void RenderFrameHostImpl::OnDeferredAfterResponseStarted( |
534 const GlobalRequestID& global_request_id) { | 534 const GlobalRequestID& global_request_id) { |
| 535 GURL transition_url = |
| 536 TransitionRequestManager::GetInstance()->CreateTransitionURL(); |
| 537 |
535 frame_tree_node_->render_manager()->OnDeferredAfterResponseStarted( | 538 frame_tree_node_->render_manager()->OnDeferredAfterResponseStarted( |
536 global_request_id, this); | 539 global_request_id, this, transition_url); |
537 | 540 |
538 if (GetParent() || !delegate_->WillHandleDeferAfterResponseStarted()) | 541 if (GetParent() || !delegate_->WillHandleDeferAfterResponseStarted()) |
539 frame_tree_node_->render_manager()->ResumeResponseDeferredAtStart(); | 542 frame_tree_node_->render_manager()->ResumeResponseDeferredAtStart(); |
540 else | 543 else |
541 delegate_->DidDeferAfterResponseStarted(); | 544 delegate_->DidDeferAfterResponseStarted(transition_url); |
542 } | 545 } |
543 | 546 |
544 void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) { | 547 void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) { |
545 // TODO(creis): Move swapped out state to RFH. Until then, only update it | 548 // TODO(creis): Move swapped out state to RFH. Until then, only update it |
546 // when swapping out the main frame. | 549 // when swapping out the main frame. |
547 if (!GetParent()) { | 550 if (!GetParent()) { |
548 // If this RenderViewHost is not in the default state, it must have already | 551 // If this RenderViewHost is not in the default state, it must have already |
549 // gone through this, therefore just return. | 552 // gone through this, therefore just return. |
550 if (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) | 553 if (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) |
551 return; | 554 return; |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 FROM_HERE, | 945 FROM_HERE, |
943 base::Bind( | 946 base::Bind( |
944 &TransitionRequestManager::SetHasPendingTransitionRequest, | 947 &TransitionRequestManager::SetHasPendingTransitionRequest, |
945 base::Unretained(TransitionRequestManager::GetInstance()), | 948 base::Unretained(TransitionRequestManager::GetInstance()), |
946 GetProcess()->GetID(), | 949 GetProcess()->GetID(), |
947 routing_id_, | 950 routing_id_, |
948 has_pending_request)); | 951 has_pending_request)); |
949 } | 952 } |
950 | 953 |
951 } // namespace content | 954 } // namespace content |
OLD | NEW |