Pass opener ID in command line

This commit is contained in:
Cheng Zhao 2015-12-17 21:27:14 +08:00
parent c7bfd5f09d
commit 0282d424bf
6 changed files with 21 additions and 12 deletions

View file

@ -132,6 +132,12 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
if (web_preferences.GetInteger(options::kGuestInstanceID, &guest_instance_id))
command_line->AppendSwitchASCII(switches::kGuestInstanceID,
base::IntToString(guest_instance_id));
// Pass the opener's window id.
int opener_id;
if (web_preferences.GetInteger(options::kOpenerID, &opener_id))
command_line->AppendSwitchASCII(switches::kOpenerID,
base::IntToString(opener_id));
}
// static