Commit eb7a973b authored by Charlie Reis's avatar Charlie Reis Committed by Commit Bot

Remove GetSwappedOutRenderViewHost.

This is no longer necessary now that we track RenderFrameProxyHosts.
This CL also cleans up many other references to "swapped out."

Bug: 1015882
Change-Id: Ib5391d360460540945891232c5eca0701fce138f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022350
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736480}
parent aa9d6fbc
...@@ -2371,8 +2371,8 @@ bool RenderFrameHostManager::ReinitializeRenderFrame( ...@@ -2371,8 +2371,8 @@ bool RenderFrameHostManager::ReinitializeRenderFrame(
// Main frames need both the RenderView and RenderFrame reinitialized, so // Main frames need both the RenderView and RenderFrame reinitialized, so
// use InitRenderView. For cross-process subframes, InitRenderView won't // use InitRenderView. For cross-process subframes, InitRenderView won't
// recreate the RenderFrame, so use InitRenderFrame instead. Note that for // recreate the RenderFrame, so use InitRenderFrame instead. Note that for
// subframe RenderFrameHosts, the swapped out RenderView in their // subframe RenderFrameHosts, the inactive RenderView in their SiteInstance
// SiteInstance will be recreated as part of CreateOpenerProxies above. // will be recreated as part of CreateOpenerProxies above.
if (!frame_tree_node_->parent()) { if (!frame_tree_node_->parent()) {
DCHECK(!GetRenderFrameProxyHost(render_frame_host->GetSiteInstance())); DCHECK(!GetRenderFrameProxyHost(render_frame_host->GetSiteInstance()));
if (!InitRenderView(render_frame_host->render_view_host(), nullptr)) if (!InitRenderView(render_frame_host->render_view_host(), nullptr))
...@@ -2684,14 +2684,6 @@ std::unique_ptr<RenderFrameHostImpl> RenderFrameHostManager::SetRenderFrameHost( ...@@ -2684,14 +2684,6 @@ std::unique_ptr<RenderFrameHostImpl> RenderFrameHostManager::SetRenderFrameHost(
return old_render_frame_host; return old_render_frame_host;
} }
RenderViewHostImpl* RenderFrameHostManager::GetSwappedOutRenderViewHost(
SiteInstance* instance) const {
RenderFrameProxyHost* proxy = GetRenderFrameProxyHost(instance);
if (proxy)
return proxy->GetRenderViewHost();
return nullptr;
}
RenderFrameProxyHost* RenderFrameHostManager::GetRenderFrameProxyHost( RenderFrameProxyHost* RenderFrameHostManager::GetRenderFrameProxyHost(
SiteInstance* instance) const { SiteInstance* instance) const {
auto it = proxy_hosts_.find(instance->GetId()); auto it = proxy_hosts_.find(instance->GetId());
...@@ -2924,7 +2916,7 @@ void RenderFrameHostManager::CreateNewFrameForInnerDelegateAttachIfNecessary() { ...@@ -2924,7 +2916,7 @@ void RenderFrameHostManager::CreateNewFrameForInnerDelegateAttachIfNecessary() {
NotifyPrepareForInnerDelegateAttachComplete(false /* success */); NotifyPrepareForInnerDelegateAttachComplete(false /* success */);
return; return;
} }
// Swap in the speculative frame. It will later on be swapped out when the // Swap in the speculative frame. It will later be replaced when
// WebContents::AttachToOuterWebContentsFrame is called. // WebContents::AttachToOuterWebContentsFrame is called.
speculative_render_frame_host_->Send( speculative_render_frame_host_->Send(
new FrameMsg_SwapIn(speculative_render_frame_host_->GetRoutingID())); new FrameMsg_SwapIn(speculative_render_frame_host_->GetRoutingID()));
......
...@@ -283,10 +283,6 @@ class CONTENT_EXPORT RenderFrameHostManager ...@@ -283,10 +283,6 @@ class CONTENT_EXPORT RenderFrameHostManager
// SiteInstance. // SiteInstance.
void CreateProxiesForChildFrame(FrameTreeNode* child); void CreateProxiesForChildFrame(FrameTreeNode* child);
// Returns the swapped out RenderViewHost for the given SiteInstance, if any.
// This method is *deprecated* and GetRenderFrameProxyHost should be used.
RenderViewHostImpl* GetSwappedOutRenderViewHost(SiteInstance* instance) const;
// Returns the RenderFrameProxyHost for the given SiteInstance, if any. // Returns the RenderFrameProxyHost for the given SiteInstance, if any.
RenderFrameProxyHost* GetRenderFrameProxyHost(SiteInstance* instance) const; RenderFrameProxyHost* GetRenderFrameProxyHost(SiteInstance* instance) const;
...@@ -385,7 +381,7 @@ class CONTENT_EXPORT RenderFrameHostManager ...@@ -385,7 +381,7 @@ class CONTENT_EXPORT RenderFrameHostManager
void EnsureRenderViewInitialized(RenderViewHostImpl* render_view_host, void EnsureRenderViewInitialized(RenderViewHostImpl* render_view_host,
SiteInstance* instance); SiteInstance* instance);
// Creates swapped out RenderViews and RenderFrameProxies for this frame's // Creates RenderFrameProxies and inactive RenderViewHosts for this frame's
// FrameTree and for its opener chain in the given SiteInstance. This allows // FrameTree and for its opener chain in the given SiteInstance. This allows
// other tabs to send cross-process JavaScript calls to their opener(s) and // other tabs to send cross-process JavaScript calls to their opener(s) and
// to any other frames in the opener's FrameTree (e.g., supporting calls like // to any other frames in the opener's FrameTree (e.g., supporting calls like
...@@ -412,8 +408,8 @@ class CONTENT_EXPORT RenderFrameHostManager ...@@ -412,8 +408,8 @@ class CONTENT_EXPORT RenderFrameHostManager
// RenderFrameProxyHost in its outer WebContents's SiteInstance, // RenderFrameProxyHost in its outer WebContents's SiteInstance,
// |outer_contents_site_instance|. The frame in outer WebContents that is // |outer_contents_site_instance|. The frame in outer WebContents that is
// hosting the inner WebContents is |render_frame_host|, and the frame will // hosting the inner WebContents is |render_frame_host|, and the frame will
// be swapped out with the proxy. Note that this method must only be called // be swapped with the proxy. Note that this method must only be called for an
// for an OOPIF-based inner WebContents. // OOPIF-based inner WebContents.
RenderFrameProxyHost* CreateOuterDelegateProxy( RenderFrameProxyHost* CreateOuterDelegateProxy(
SiteInstance* outer_contents_site_instance); SiteInstance* outer_contents_site_instance);
...@@ -473,8 +469,8 @@ class CONTENT_EXPORT RenderFrameHostManager ...@@ -473,8 +469,8 @@ class CONTENT_EXPORT RenderFrameHostManager
// Sets up the necessary state for a new RenderViewHost. If |proxy| is not // Sets up the necessary state for a new RenderViewHost. If |proxy| is not
// null, it creates a RenderFrameProxy in the target renderer process which is // null, it creates a RenderFrameProxy in the target renderer process which is
// used to route IPC messages when in swapped out state. Returns early if the // used to route IPC messages. Returns early if the RenderViewHost has
// RenderViewHost has already been initialized for another RenderFrameHost. // already been initialized for another RenderFrameHost.
bool InitRenderView(RenderViewHostImpl* render_view_host, bool InitRenderView(RenderViewHostImpl* render_view_host,
RenderFrameProxyHost* proxy); RenderFrameProxyHost* proxy);
...@@ -684,7 +680,7 @@ class CONTENT_EXPORT RenderFrameHostManager ...@@ -684,7 +680,7 @@ class CONTENT_EXPORT RenderFrameHostManager
std::vector<FrameTree*>* opener_frame_trees, std::vector<FrameTree*>* opener_frame_trees,
std::unordered_set<FrameTreeNode*>* nodes_with_back_links); std::unordered_set<FrameTreeNode*>* nodes_with_back_links);
// Create swapped out RenderViews and RenderFrameProxies in the given // Create RenderFrameProxies and inactive RenderViewHosts in the given
// SiteInstance for the current node's FrameTree. Used as a helper function // SiteInstance for the current node's FrameTree. Used as a helper function
// in CreateOpenerProxies for creating proxies in each FrameTree on the // in CreateOpenerProxies for creating proxies in each FrameTree on the
// opener chain. Don't create proxies for the subtree rooted at // opener chain. Don't create proxies for the subtree rooted at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment