Fix devtools not working
This commit is contained in:
parent
d3a39540b5
commit
ead0bb0cfc
3 changed files with 13 additions and 5 deletions
|
@ -251,10 +251,6 @@ void InspectableWebContentsImpl::ShowDevTools() {
|
|||
devtools_web_contents_->SetDelegate(this);
|
||||
|
||||
agent_host_ = content::DevToolsAgentHost::GetOrCreateFor(web_contents_.get());
|
||||
frontend_host_.reset(content::DevToolsFrontendHost::Create(
|
||||
web_contents_->GetMainFrame(),
|
||||
base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
||||
base::Unretained(this))));
|
||||
agent_host_->AttachClient(this);
|
||||
|
||||
GURL devtools_url(base::StringPrintf(kChromeUIDevToolsURL,
|
||||
|
@ -634,6 +630,16 @@ void InspectableWebContentsImpl::OnWebContentsFocused() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void InspectableWebContentsImpl::DidStartNavigationToPendingEntry(
|
||||
const GURL& url,
|
||||
content::NavigationController::ReloadType reload_type) {
|
||||
frontend_host_.reset(
|
||||
content::DevToolsFrontendHost::Create(
|
||||
web_contents()->GetMainFrame(),
|
||||
base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
||||
base::Unretained(this))));
|
||||
}
|
||||
|
||||
void InspectableWebContentsImpl::OnURLFetchComplete(const net::URLFetcher* source) {
|
||||
DCHECK(source);
|
||||
PendingRequestsMap::iterator it = pending_requests_.find(source);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue