method to reset agent_host
This commit is contained in:
parent
d350e73dff
commit
145c18f4c8
3 changed files with 20 additions and 0 deletions
|
@ -188,6 +188,18 @@ bool InspectableWebContentsImpl::IsDevToolsViewShowing() {
|
|||
return devtools_web_contents_ && view_->IsDevToolsViewShowing();
|
||||
}
|
||||
|
||||
void InspectableWebContentsImpl::AttachTo(const scoped_refptr<content::DevToolsAgentHost>& host) {
|
||||
if (agent_host_.get())
|
||||
Detach();
|
||||
agent_host_ = host;
|
||||
agent_host_->AttachClient(this);
|
||||
}
|
||||
|
||||
void InspectableWebContentsImpl::Detach() {
|
||||
agent_host_->DetachClient();
|
||||
agent_host_ = nullptr;
|
||||
}
|
||||
|
||||
gfx::Rect InspectableWebContentsImpl::GetDevToolsBounds() const {
|
||||
return devtools_bounds_;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue