Make sure chrome.devtools.inspectedWindow.tabId is set

This commit is contained in:
Cheng Zhao 2016-05-26 19:29:39 +09:00
parent edd8210ae5
commit cdfbe876a5

View file

@ -655,6 +655,11 @@ void WebContents::DevToolsOpened() {
isolate(), managed_web_contents()->GetDevToolsWebContents());
devtools_web_contents_.Reset(isolate(), handle.ToV8());
// Set inspected tabID.
base::FundamentalValue tab_id(ID());
managed_web_contents()->CallClientFunction(
"DevToolsAPI.setInspectedTabId", &tab_id, nullptr, nullptr);
// Inherit owner window in devtools.
if (owner_window())
handle->SetOwnerWindow(managed_web_contents()->GetDevToolsWebContents(),