Index: chrome/browser/ui/browser_navigator.cc |
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc |
index 72505692db50fb265dc6bf352d0ffa1524e72157..0b7d3902ac31e127bb519f1b99a59004d02aef4f 100644 |
--- a/chrome/browser/ui/browser_navigator.cc |
+++ b/chrome/browser/ui/browser_navigator.cc |
@@ -329,7 +329,9 @@ content::WebContents* CreateTargetContents(const chrome::NavigateParams& params, |
} |
#endif |
- content::WebContents* target_contents = WebContents::Create(create_params); |
+ WebContents* target_contents = WebContents::Create( |
+ create_params, params.should_set_opener ? params.source_contents : NULL); |
+ |
// New tabs can have WebUI URLs that will make calls back to arbitrary |
// tab helpers, so the entire set of tab helpers needs to be set up |
// immediately. |
@@ -393,7 +395,8 @@ NavigateParams::NavigateParams(Browser* a_browser, |
browser(a_browser), |
initiating_profile(NULL), |
host_desktop_type(GetHostDesktop(a_browser)), |
- should_replace_current_entry(false) { |
+ should_replace_current_entry(false), |
+ should_set_opener(false) { |
} |
NavigateParams::NavigateParams(Browser* a_browser, |
@@ -412,7 +415,8 @@ NavigateParams::NavigateParams(Browser* a_browser, |
browser(a_browser), |
initiating_profile(NULL), |
host_desktop_type(GetHostDesktop(a_browser)), |
- should_replace_current_entry(false) { |
+ should_replace_current_entry(false), |
+ should_set_opener(false) { |
} |
NavigateParams::NavigateParams(Profile* a_profile, |
@@ -433,7 +437,8 @@ NavigateParams::NavigateParams(Profile* a_profile, |
browser(NULL), |
initiating_profile(a_profile), |
host_desktop_type(chrome::GetActiveDesktop()), |
- should_replace_current_entry(false) { |
+ should_replace_current_entry(false), |
+ should_set_opener(false) { |
} |
NavigateParams::~NavigateParams() {} |