mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-25 00:17:41 +01:00
Fix loading of the DevTools window.
- The devtools.html file has been renamed to inspector.html.
This commit is contained in:
parent
96e116de9e
commit
5f0720e096
@ -112,7 +112,7 @@ std::string CefDevToolsDelegate::GetFrontendResource(
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string CefDevToolsDelegate::GetChromeDevToolsURL() {
|
std::string CefDevToolsDelegate::GetChromeDevToolsURL() {
|
||||||
return base::StringPrintf("%s://%s/devtools.html",
|
return base::StringPrintf("%s://%s/inspector.html",
|
||||||
content::kChromeDevToolsScheme, scheme::kChromeDevToolsHost);
|
content::kChromeDevToolsScheme, scheme::kChromeDevToolsHost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,9 +186,15 @@ void CefDevToolsFrontend::RenderViewCreated(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefDevToolsFrontend::DocumentAvailableInMainFrame() {
|
void CefDevToolsFrontend::DocumentAvailableInMainFrame() {
|
||||||
agent_host_ =
|
// Don't call AttachClient multiple times for the same DevToolsAgentHost.
|
||||||
|
// Otherwise it will call AgentHostClosed which closes the DevTools window.
|
||||||
|
// This may happen in cases where the DevTools content fails to load.
|
||||||
|
scoped_refptr<content::DevToolsAgentHost> agent_host =
|
||||||
content::DevToolsAgentHost::GetOrCreateFor(inspected_contents_);
|
content::DevToolsAgentHost::GetOrCreateFor(inspected_contents_);
|
||||||
agent_host_->AttachClient(this);
|
if (agent_host != agent_host_) {
|
||||||
|
agent_host_ = agent_host;
|
||||||
|
agent_host_->AttachClient(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefDevToolsFrontend::WebContentsDestroyed() {
|
void CefDevToolsFrontend::WebContentsDestroyed() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user