Setup devtools client for the correct contents.

This commit is contained in:
Cheng Zhao 2014-02-24 10:09:32 +08:00
parent 618040efc1
commit 1f57994e2a

View file

@ -207,7 +207,7 @@ void NativeWindow::DebugDevTools() {
devtools_web_contents->GetRenderViewHost());
content::DevToolsClientHost* frontend_host =
content::DevToolsClientHost::CreateDevToolsFrontendHost(
devtools_web_contents, window);
window->GetWebContents(), window);
content::DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor(
agent_host, frontend_host);
@ -487,8 +487,8 @@ void NativeWindow::DispatchOnEmbedder(const std::string& message) {
}
void NativeWindow::InspectedContentsClosing() {
// We are acting as devtools debugger, safe to delete here.
delete this;
// We are acting as devtools debugger, safe to close here.
CloseImmediately();
}
void NativeWindow::OnCapturePageDone(const CapturePageCallback& callback,