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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
810 NOTREACHED() << "RFH should be in default state when calling SwapOut."; | 810 NOTREACHED() << "RFH should be in default state when calling SwapOut."; |
811 return; | 811 return; |
812 } | 812 } |
813 | 813 |
814 SetState(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT); | 814 SetState(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT); |
815 swapout_event_monitor_timeout_->Start( | 815 swapout_event_monitor_timeout_->Start( |
816 base::TimeDelta::FromMilliseconds(RenderViewHostImpl::kUnloadTimeoutMS)); | 816 base::TimeDelta::FromMilliseconds(RenderViewHostImpl::kUnloadTimeoutMS)); |
817 | 817 |
818 // There may be no proxy if there are no active views in the process. | 818 // There may be no proxy if there are no active views in the process. |
819 int proxy_routing_id = MSG_ROUTING_NONE; | 819 int proxy_routing_id = MSG_ROUTING_NONE; |
820 FrameReplicationState replication_state; | |
820 if (proxy) { | 821 if (proxy) { |
821 set_render_frame_proxy_host(proxy); | 822 set_render_frame_proxy_host(proxy); |
822 proxy_routing_id = proxy->GetRoutingID(); | 823 proxy_routing_id = proxy->GetRoutingID(); |
824 replication_state = proxy->frame_tree_node()->current_replication_state(); | |
823 } | 825 } |
824 | 826 |
825 if (IsRenderFrameLive()) | 827 if (IsRenderFrameLive()) |
Charlie Reis
2014/11/13 18:00:57
Style: This needs braces if the body doesn't fit o
alexmos
2014/11/18 18:25:32
Done.
| |
826 Send(new FrameMsg_SwapOut(routing_id_, proxy_routing_id)); | 828 Send(new FrameMsg_SwapOut(routing_id_, |
829 proxy_routing_id, | |
830 replication_state)); | |
827 | 831 |
828 if (!GetParent()) | 832 if (!GetParent()) |
829 delegate_->SwappedOut(this); | 833 delegate_->SwappedOut(this); |
830 } | 834 } |
831 | 835 |
832 void RenderFrameHostImpl::OnBeforeUnloadACK( | 836 void RenderFrameHostImpl::OnBeforeUnloadACK( |
833 bool proceed, | 837 bool proceed, |
834 const base::TimeTicks& renderer_before_unload_start_time, | 838 const base::TimeTicks& renderer_before_unload_start_time, |
835 const base::TimeTicks& renderer_before_unload_end_time) { | 839 const base::TimeTicks& renderer_before_unload_end_time) { |
836 TRACE_EVENT_ASYNC_END0( | 840 TRACE_EVENT_ASYNC_END0( |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1698 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1702 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1699 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1703 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1700 GetContentClient()->browser()->RegisterPermissionUsage( | 1704 GetContentClient()->browser()->RegisterPermissionUsage( |
1701 PERMISSION_GEOLOCATION, | 1705 PERMISSION_GEOLOCATION, |
1702 delegate_->GetAsWebContents(), | 1706 delegate_->GetAsWebContents(), |
1703 GetLastCommittedURL().GetOrigin(), | 1707 GetLastCommittedURL().GetOrigin(), |
1704 top_frame->GetLastCommittedURL().GetOrigin()); | 1708 top_frame->GetLastCommittedURL().GetOrigin()); |
1705 } | 1709 } |
1706 | 1710 |
1707 } // namespace content | 1711 } // namespace content |
OLD | NEW |