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" |
11 #include "content/browser/child_process_security_policy_impl.h" | 11 #include "content/browser/child_process_security_policy_impl.h" |
12 #include "content/browser/frame_host/cross_process_frame_connector.h" | 12 #include "content/browser/frame_host/cross_process_frame_connector.h" |
13 #include "content/browser/frame_host/cross_site_transferring_request.h" | 13 #include "content/browser/frame_host/cross_site_transferring_request.h" |
14 #include "content/browser/frame_host/frame_tree.h" | 14 #include "content/browser/frame_host/frame_tree.h" |
15 #include "content/browser/frame_host/frame_tree_node.h" | 15 #include "content/browser/frame_host/frame_tree_node.h" |
16 #include "content/browser/frame_host/navigator.h" | 16 #include "content/browser/frame_host/navigator.h" |
17 #include "content/browser/frame_host/render_frame_host_delegate.h" | 17 #include "content/browser/frame_host/render_frame_host_delegate.h" |
18 #include "content/browser/frame_host/render_frame_proxy_host.h" | 18 #include "content/browser/frame_host/render_frame_proxy_host.h" |
19 #include "content/browser/renderer_host/input/input_router.h" | 19 #include "content/browser/renderer_host/input/input_router.h" |
20 #include "content/browser/renderer_host/input/timeout_monitor.h" | 20 #include "content/browser/renderer_host/input/timeout_monitor.h" |
21 #include "content/browser/renderer_host/render_view_host_impl.h" | 21 #include "content/browser/renderer_host/render_view_host_impl.h" |
22 #include "content/browser/transition_request_manager.h" | |
22 #include "content/common/desktop_notification_messages.h" | 23 #include "content/common/desktop_notification_messages.h" |
23 #include "content/common/frame_messages.h" | 24 #include "content/common/frame_messages.h" |
24 #include "content/common/input_messages.h" | 25 #include "content/common/input_messages.h" |
25 #include "content/common/inter_process_time_ticks_converter.h" | 26 #include "content/common/inter_process_time_ticks_converter.h" |
26 #include "content/common/swapped_out_messages.h" | 27 #include "content/common/swapped_out_messages.h" |
27 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
28 #include "content/public/browser/content_browser_client.h" | 29 #include "content/public/browser/content_browser_client.h" |
29 #include "content/public/browser/desktop_notification_delegate.h" | 30 #include "content/public/browser/desktop_notification_delegate.h" |
30 #include "content/public/browser/render_process_host.h" | 31 #include "content/public/browser/render_process_host.h" |
31 #include "content/public/browser/render_widget_host_view.h" | 32 #include "content/public/browser/render_widget_host_view.h" |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
498 const std::vector<GURL>& transfer_url_chain, | 499 const std::vector<GURL>& transfer_url_chain, |
499 const Referrer& referrer, | 500 const Referrer& referrer, |
500 PageTransition page_transition, | 501 PageTransition page_transition, |
501 bool should_replace_current_entry) { | 502 bool should_replace_current_entry) { |
502 frame_tree_node_->render_manager()->OnCrossSiteResponse( | 503 frame_tree_node_->render_manager()->OnCrossSiteResponse( |
503 this, global_request_id, cross_site_transferring_request.Pass(), | 504 this, global_request_id, cross_site_transferring_request.Pass(), |
504 transfer_url_chain, referrer, page_transition, | 505 transfer_url_chain, referrer, page_transition, |
505 should_replace_current_entry); | 506 should_replace_current_entry); |
506 } | 507 } |
507 | 508 |
509 void RenderFrameHostImpl::OnDeferredAfterResponseStarted( | |
510 const GlobalRequestID& global_request_id) { | |
511 frame_tree_node_->render_manager()->OnDeferredAfterResponseStarted( | |
512 global_request_id, this); | |
513 | |
514 if (!GetParent()) | |
515 delegate_->DidDeferAfterResponseStarted(); | |
516 } | |
517 | |
508 void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) { | 518 void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) { |
509 // TODO(creis): Move swapped out state to RFH. Until then, only update it | 519 // TODO(creis): Move swapped out state to RFH. Until then, only update it |
510 // when swapping out the main frame. | 520 // when swapping out the main frame. |
511 if (!GetParent()) { | 521 if (!GetParent()) { |
512 // If this RenderViewHost is not in the default state, it must have already | 522 // If this RenderViewHost is not in the default state, it must have already |
513 // gone through this, therefore just return. | 523 // gone through this, therefore just return. |
514 if (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) | 524 if (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) |
515 return; | 525 return; |
516 | 526 |
517 render_view_host_->SetState( | 527 render_view_host_->SetState( |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
884 void RenderFrameHostImpl::NotificationClosed(int notification_id) { | 894 void RenderFrameHostImpl::NotificationClosed(int notification_id) { |
885 cancel_notification_callbacks_.erase(notification_id); | 895 cancel_notification_callbacks_.erase(notification_id); |
886 } | 896 } |
887 | 897 |
888 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone( | 898 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone( |
889 int callback_context) { | 899 int callback_context) { |
890 Send(new DesktopNotificationMsg_PermissionRequestDone( | 900 Send(new DesktopNotificationMsg_PermissionRequestDone( |
891 routing_id_, callback_context)); | 901 routing_id_, callback_context)); |
892 } | 902 } |
893 | 903 |
904 void RenderFrameHostImpl::SetHasPendingTransitionRequest( | |
nasko
2014/06/02 21:59:33
Does this method ever get called with value of tru
shatch
2014/06/02 23:40:40
Yeah, this will get called eventually by the embed
| |
905 bool has_pending_request) { | |
906 TransitionRequestManager::GetInstance()->SetHasPendingTransitionRequest( | |
907 GetProcess()->GetID(), | |
908 render_view_host_->GetRoutingID(), | |
nasko
2014/06/02 21:59:33
Why use the routing id of the RVH and not the RFH
shatch
2014/06/02 23:40:40
Changed to RFH routing id per offline discussion.
| |
909 has_pending_request); | |
910 } | |
911 | |
894 } // namespace content | 912 } // namespace content |
OLD | NEW |