Inherit owner window in devtools

This commit is contained in:
Cheng Zhao 2015-10-01 14:41:01 +08:00
parent 1045bbc861
commit ca40ea8e2f
3 changed files with 12 additions and 1 deletions

View file

@ -506,6 +506,11 @@ void WebContents::DevToolsOpened() {
isolate(), managed_web_contents()->GetDevToolsWebContents());
devtools_web_contents_.Reset(isolate(), handle.ToV8());
// Inherit owner window in devtools.
if (owner_window())
handle->SetOwnerWindow(managed_web_contents()->GetDevToolsWebContents(),
owner_window());
Emit("devtools-opened");
}