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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 const Referrer& referrer, | 527 const Referrer& referrer, |
528 PageTransition page_transition, | 528 PageTransition page_transition, |
529 bool should_replace_current_entry) { | 529 bool should_replace_current_entry) { |
530 frame_tree_node_->render_manager()->OnCrossSiteResponse( | 530 frame_tree_node_->render_manager()->OnCrossSiteResponse( |
531 this, global_request_id, cross_site_transferring_request.Pass(), | 531 this, global_request_id, cross_site_transferring_request.Pass(), |
532 transfer_url_chain, referrer, page_transition, | 532 transfer_url_chain, referrer, page_transition, |
533 should_replace_current_entry); | 533 should_replace_current_entry); |
534 } | 534 } |
535 | 535 |
536 void RenderFrameHostImpl::OnDeferredAfterResponseStarted( | 536 void RenderFrameHostImpl::OnDeferredAfterResponseStarted( |
537 const GlobalRequestID& global_request_id) { | 537 const GlobalRequestID& global_request_id, |
| 538 const scoped_refptr<net::HttpResponseHeaders>& headers, |
| 539 const GURL& url) { |
538 frame_tree_node_->render_manager()->OnDeferredAfterResponseStarted( | 540 frame_tree_node_->render_manager()->OnDeferredAfterResponseStarted( |
539 global_request_id, this); | 541 global_request_id, this); |
540 | 542 |
541 if (GetParent() || !delegate_->WillHandleDeferAfterResponseStarted()) | 543 if (GetParent() || !delegate_->WillHandleDeferAfterResponseStarted()) |
542 frame_tree_node_->render_manager()->ResumeResponseDeferredAtStart(); | 544 frame_tree_node_->render_manager()->ResumeResponseDeferredAtStart(); |
543 else | 545 else |
544 delegate_->DidDeferAfterResponseStarted(); | 546 delegate_->DidDeferAfterResponseStarted(headers, url); |
545 } | 547 } |
546 | 548 |
547 void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) { | 549 void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) { |
548 // TODO(creis): Move swapped out state to RFH. Until then, only update it | 550 // TODO(creis): Move swapped out state to RFH. Until then, only update it |
549 // when swapping out the main frame. | 551 // when swapping out the main frame. |
550 if (!GetParent()) { | 552 if (!GetParent()) { |
551 // If this RenderViewHost is not in the default state, it must have already | 553 // If this RenderViewHost is not in the default state, it must have already |
552 // gone through this, therefore just return. | 554 // gone through this, therefore just return. |
553 if (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) | 555 if (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) |
554 return; | 556 return; |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 FROM_HERE, | 955 FROM_HERE, |
954 base::Bind( | 956 base::Bind( |
955 &TransitionRequestManager::SetHasPendingTransitionRequest, | 957 &TransitionRequestManager::SetHasPendingTransitionRequest, |
956 base::Unretained(TransitionRequestManager::GetInstance()), | 958 base::Unretained(TransitionRequestManager::GetInstance()), |
957 GetProcess()->GetID(), | 959 GetProcess()->GetID(), |
958 routing_id_, | 960 routing_id_, |
959 has_pending_request)); | 961 has_pending_request)); |
960 } | 962 } |
961 | 963 |
962 } // namespace content | 964 } // namespace content |
OLD | NEW |