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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
910 // document. Check if |render_frame_host| is already swapped out, to avoid | 910 // document. Check if |render_frame_host| is already swapped out, to avoid |
911 // swapping it out again. | 911 // swapping it out again. |
912 if (!render_frame_host->is_swapped_out()) | 912 if (!render_frame_host->is_swapped_out()) |
913 render_frame_host->SwapOut(proxy, false); | 913 render_frame_host->SwapOut(proxy, false); |
914 | 914 |
915 proxy->TakeFrameHostOwnership(render_frame_host.Pass()); | 915 proxy->TakeFrameHostOwnership(render_frame_host.Pass()); |
916 } | 916 } |
917 } | 917 } |
918 | 918 |
919 if (render_frame_host) { | 919 if (render_frame_host) { |
920 if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) { | |
921 // RenderFrame that has not committed yet isn't linked into the renderer | |
Charlie Reis
2015/10/29 17:28:58
nit: Let's rephrase this. Is the part about being
nasko
2015/10/29 19:09:45
Done.
| |
922 // process frame tree. This requires an explicit cleanup, so send an IPC | |
923 // to delete the RenderFrame. | |
924 render_frame_host->Send( | |
925 new FrameMsg_DeleteFrame(render_frame_host->GetRoutingID())); | |
926 } | |
927 | |
920 // We won't be coming back, so delete this one. | 928 // We won't be coming back, so delete this one. |
921 ShutdownProxiesIfLastActiveFrameInSiteInstance(render_frame_host.get()); | 929 ShutdownProxiesIfLastActiveFrameInSiteInstance(render_frame_host.get()); |
922 render_frame_host.reset(); | 930 render_frame_host.reset(); |
923 } | 931 } |
924 } | 932 } |
925 | 933 |
926 void RenderFrameHostManager::MoveToPendingDeleteHosts( | 934 void RenderFrameHostManager::MoveToPendingDeleteHosts( |
927 scoped_ptr<RenderFrameHostImpl> render_frame_host) { | 935 scoped_ptr<RenderFrameHostImpl> render_frame_host) { |
928 // If this is the main frame going away and there are no more references to | 936 // If this is the main frame going away and there are no more references to |
929 // its RenderViewHost, mark it for deletion as well so that we don't try to | 937 // its RenderViewHost, mark it for deletion as well so that we don't try to |
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2669 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { | 2677 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { |
2670 if (!frame_tree_node_->opener()) | 2678 if (!frame_tree_node_->opener()) |
2671 return MSG_ROUTING_NONE; | 2679 return MSG_ROUTING_NONE; |
2672 | 2680 |
2673 return frame_tree_node_->opener() | 2681 return frame_tree_node_->opener() |
2674 ->render_manager() | 2682 ->render_manager() |
2675 ->GetRoutingIdForSiteInstance(instance); | 2683 ->GetRoutingIdForSiteInstance(instance); |
2676 } | 2684 } |
2677 | 2685 |
2678 } // namespace content | 2686 } // namespace content |
OLD | NEW |