| 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..98f8575ba4ab95580b990ea12909e27578e2447d 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -621,8 +621,17 @@ 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_renderer_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_renderer_for_new_contents = false;
|
| navigate_params.source_site_instance =
|
| render_frame_host()->GetSiteInstance();
|
| +
|
| chrome::Navigate(&navigate_params);
|
| }
|
|
|
|
|