| 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 // Clean up the unused RenderFrame in the renderer process. |
| 922 render_frame_host->Send( |
| 923 new FrameMsg_Detach(render_frame_host->GetRoutingID())); |
| 924 } |
| 925 |
| 920 // We won't be coming back, so delete this one. | 926 // We won't be coming back, so delete this one. |
| 921 ShutdownProxiesIfLastActiveFrameInSiteInstance(render_frame_host.get()); | 927 ShutdownProxiesIfLastActiveFrameInSiteInstance(render_frame_host.get()); |
| 922 render_frame_host.reset(); | 928 render_frame_host.reset(); |
| 923 } | 929 } |
| 924 } | 930 } |
| 925 | 931 |
| 926 void RenderFrameHostManager::MoveToPendingDeleteHosts( | 932 void RenderFrameHostManager::MoveToPendingDeleteHosts( |
| 927 scoped_ptr<RenderFrameHostImpl> render_frame_host) { | 933 scoped_ptr<RenderFrameHostImpl> render_frame_host) { |
| 928 // If this is the main frame going away and there are no more references to | 934 // 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 | 935 // 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) { | 2675 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { |
| 2670 if (!frame_tree_node_->opener()) | 2676 if (!frame_tree_node_->opener()) |
| 2671 return MSG_ROUTING_NONE; | 2677 return MSG_ROUTING_NONE; |
| 2672 | 2678 |
| 2673 return frame_tree_node_->opener() | 2679 return frame_tree_node_->opener() |
| 2674 ->render_manager() | 2680 ->render_manager() |
| 2675 ->GetRoutingIdForSiteInstance(instance); | 2681 ->GetRoutingIdForSiteInstance(instance); |
| 2676 } | 2682 } |
| 2677 | 2683 |
| 2678 } // namespace content | 2684 } // namespace content |
| OLD | NEW |