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

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

Issue 2921753002: NOT YET READY: Making chrome.windows.create establish an actual "opener" relationship.
Patch Set: Fix incognito profile transitions Created 3 years, 7 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 a3b16919c5a6d9bc840574dac92ec7706a7622ca..4cd7223e3b7585ef3b4141ef74aedc90c10c0d67 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -570,14 +570,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
chrome::NavigateParams navigate_params(new_window, url,
ui::PAGE_TRANSITION_LINK);
navigate_params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
-
- // The next 2 statements put the new contents in the same BrowsingInstance
- // as their opener. Note that |force_new_process_for_new_contents = false|
- // means that new contents might still end up in a new renderer
- // (if they open a web URL and are transferred out of an extension
- // renderer), but even in this case the flags below ensure findability via
- // window.open.
- navigate_params.force_new_process_for_new_contents = false;
+ navigate_params.opener = render_frame_host();
Charlie Reis 2017/06/05 21:06:28 Worth keeping a comment saying that the intention
Łukasz Anforowicz 2017/06/05 22:06:54 Done.
navigate_params.source_site_instance =
render_frame_host()->GetSiteInstance();
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_test.cc » ('j') | chrome/browser/extensions/api/tabs/tabs_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698