method to reset agent_host

This commit is contained in:
deepak1556 2015-05-18 19:26:03 +05:30
parent d350e73dff
commit 145c18f4c8
3 changed files with 20 additions and 0 deletions

View file

@ -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_;
}