DevToolsFrontendHost::Create to return unique_ptr instead of raw pointer
1396614
This commit is contained in:
parent
9b82e7d27b
commit
315f8c0cc7
1 changed files with 4 additions and 4 deletions
|
@ -732,10 +732,10 @@ void InspectableWebContentsImpl::RenderFrameHostChanged(
|
||||||
content::RenderFrameHost* new_host) {
|
content::RenderFrameHost* new_host) {
|
||||||
if (new_host->GetParent())
|
if (new_host->GetParent())
|
||||||
return;
|
return;
|
||||||
frontend_host_.reset(content::DevToolsFrontendHost::Create(
|
frontend_host_ = content::DevToolsFrontendHost::Create(
|
||||||
new_host,
|
new_host,
|
||||||
base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
||||||
weak_factory_.GetWeakPtr())));
|
weak_factory_.GetWeakPtr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InspectableWebContentsImpl::WebContentsDestroyed() {
|
void InspectableWebContentsImpl::WebContentsDestroyed() {
|
||||||
|
@ -836,11 +836,11 @@ void InspectableWebContentsImpl::ReadyToCommitNavigation(
|
||||||
frontend_host_) {
|
frontend_host_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
frontend_host_.reset(content::DevToolsFrontendHost::Create(
|
frontend_host_ = content::DevToolsFrontendHost::Create(
|
||||||
web_contents()->GetMainFrame(),
|
web_contents()->GetMainFrame(),
|
||||||
base::Bind(
|
base::Bind(
|
||||||
&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
||||||
base::Unretained(this))));
|
base::Unretained(this)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue