| Index: content/browser/devtools/devtools_agent_host_impl.cc
|
| diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
|
| index b7f9b24b59f5a749f37691ebb4ed0d40878b3a6a..0630a0473be002c67659a9a17d0bf043922f8410 100644
|
| --- a/content/browser/devtools/devtools_agent_host_impl.cc
|
| +++ b/content/browser/devtools/devtools_agent_host_impl.cc
|
| @@ -75,10 +75,11 @@
|
| if (client_) {
|
| client_->AgentHostClosed(this, true);
|
| Detach();
|
| + } else {
|
| + DevToolsManager::GetInstance()->OnClientAttached();
|
| }
|
| client_ = client;
|
| Attach();
|
| - DevToolsManager::GetInstance()->AgentHostChanged(this);
|
| }
|
|
|
| void DevToolsAgentHostImpl::DetachClient() {
|
| @@ -87,8 +88,8 @@
|
|
|
| scoped_refptr<DevToolsAgentHostImpl> protect(this);
|
| client_ = NULL;
|
| + DevToolsManager::GetInstance()->OnClientDetached();
|
| Detach();
|
| - DevToolsManager::GetInstance()->AgentHostChanged(this);
|
| }
|
|
|
| bool DevToolsAgentHostImpl::IsAttached() {
|
| @@ -124,8 +125,8 @@
|
| // Clear |client_| before notifying it.
|
| DevToolsAgentHostClient* client = client_;
|
| client_ = NULL;
|
| + DevToolsManager::GetInstance()->OnClientDetached();
|
| client->AgentHostClosed(this, false);
|
| - DevToolsManager::GetInstance()->AgentHostChanged(this);
|
| }
|
|
|
| void DevToolsAgentHostImpl::SendMessageToClient(const std::string& message) {
|
| @@ -149,9 +150,9 @@
|
| // Clear |client_| before notifying it.
|
| DevToolsAgentHostClient* client = agent_host->client_;
|
| agent_host->client_ = NULL;
|
| + DevToolsManager::GetInstance()->OnClientDetached();
|
| client->AgentHostClosed(agent_host, true);
|
| agent_host->Detach();
|
| - DevToolsManager::GetInstance()->AgentHostChanged(protect);
|
| }
|
| }
|
| }
|
|
|