Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 600553003: Enable swapping a frame back in to its parent process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remoteToLocal
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 // If there is no last non-interstitial entry (and current_instance already 925 // If there is no last non-interstitial entry (and current_instance already
926 // has a site), then we must have been opened from another tab. We want 926 // has a site), then we must have been opened from another tab. We want
927 // to compare against the URL of the page that opened us, but we can't 927 // to compare against the URL of the page that opened us, but we can't
928 // get to it directly. The best we can do is check against the site of 928 // get to it directly. The best we can do is check against the site of
929 // the SiteInstance. This will be correct when we intercept links and 929 // the SiteInstance. This will be correct when we intercept links and
930 // script-based navigations, but for now, it could place some pages in a 930 // script-based navigations, but for now, it could place some pages in a
931 // new process unnecessarily. We should only hit this case if a page tries 931 // new process unnecessarily. We should only hit this case if a page tries
932 // to open a new tab to an interstitial-inducing URL, and then navigates 932 // to open a new tab to an interstitial-inducing URL, and then navigates
933 // the page to a different same-site URL. (This seems very unlikely in 933 // the page to a different same-site URL. (This seems very unlikely in
934 // practice.) 934 // practice.)
935 const GURL& current_url = (current_entry) ? current_entry->GetURL() : 935 const GURL& current_url = (current_entry) ? frame_tree_node_->current_url() :
Charlie Reis 2014/10/28 16:38:29 I'm a little nervous about this because I don't tr
Nate Chapin 2014/10/28 19:59:19 Ok, will split out and land that first.
936 current_instance->GetSiteURL(); 936 current_instance->GetSiteURL();
937 937
938 // View-source URLs must use a new SiteInstance and BrowsingInstance. 938 // View-source URLs must use a new SiteInstance and BrowsingInstance.
939 // We don't need a swap when going from view-source to a debug URL like 939 // We don't need a swap when going from view-source to a debug URL like
940 // chrome://crash, however. 940 // chrome://crash, however.
941 // TODO(creis): Refactor this method so this duplicated code isn't needed. 941 // TODO(creis): Refactor this method so this duplicated code isn't needed.
942 // See http://crbug.com/123007. 942 // See http://crbug.com/123007.
943 if (current_entry && 943 if (current_entry &&
944 current_entry->IsViewSourceMode() != dest_is_view_source_mode && 944 current_entry->IsViewSourceMode() != dest_is_view_source_mode &&
945 !IsRendererDebugURL(dest_url)) { 945 !IsRendererDebugURL(dest_url)) {
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 void RenderFrameHostManager::DeleteRenderFrameProxyHost( 1607 void RenderFrameHostManager::DeleteRenderFrameProxyHost(
1608 SiteInstance* instance) { 1608 SiteInstance* instance) {
1609 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); 1609 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId());
1610 if (iter != proxy_hosts_.end()) { 1610 if (iter != proxy_hosts_.end()) {
1611 delete iter->second; 1611 delete iter->second;
1612 proxy_hosts_.erase(iter); 1612 proxy_hosts_.erase(iter);
1613 } 1613 }
1614 } 1614 }
1615 1615
1616 } // namespace content 1616 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698