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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 2686943002: New WebContents created via ctrl-click should be in a new process. (Closed)
Patch Set: Addressed CR feedback from creis@. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index e4ec50d3ce1cbe127880073ff250eaddf86ab6fd..30ae516d6381709c9ed6c62edd6cd72fddb4abc3 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -621,8 +621,13 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
chrome::NavigateParams navigate_params(new_window, url,
ui::PAGE_TRANSITION_LINK);
navigate_params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
+
+ // Make sure that (if possible) the new contents are created in the same
+ // renderer process as the caller of the chrome.windows.create API.
+ navigate_params.use_new_renderer_for_new_contents = false;
Devlin 2017/04/20 16:22:30 This is probably checked later, but maybe we shoul
Łukasz Anforowicz 2017/04/20 19:03:57 1. Note that the current CL doesn't change the beh
navigate_params.source_site_instance =
render_frame_host()->GetSiteInstance();
+
chrome::Navigate(&navigate_params);
}

Powered by Google App Engine
This is Rietveld 408576698