| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/debugger/devtools_agent_host.h" | 5 #include "content/browser/debugger/devtools_agent_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "content/common/devtools_messages.h" | 8 #include "content/common/devtools_messages.h" |
| 9 | 9 |
| 10 namespace content { |
| 11 |
| 10 DevToolsAgentHost::DevToolsAgentHost() : close_listener_(NULL) { | 12 DevToolsAgentHost::DevToolsAgentHost() : close_listener_(NULL) { |
| 11 } | 13 } |
| 12 | 14 |
| 13 void DevToolsAgentHost::Attach() { | 15 void DevToolsAgentHost::Attach() { |
| 14 SendMessageToAgent(new DevToolsAgentMsg_Attach(MSG_ROUTING_NONE)); | 16 SendMessageToAgent(new DevToolsAgentMsg_Attach(MSG_ROUTING_NONE)); |
| 15 } | 17 } |
| 16 | 18 |
| 17 void DevToolsAgentHost::Reattach(const std::string& saved_agent_state) { | 19 void DevToolsAgentHost::Reattach(const std::string& saved_agent_state) { |
| 18 SendMessageToAgent(new DevToolsAgentMsg_Reattach( | 20 SendMessageToAgent(new DevToolsAgentMsg_Reattach( |
| 19 MSG_ROUTING_NONE, | 21 MSG_ROUTING_NONE, |
| 20 saved_agent_state)); | 22 saved_agent_state)); |
| 21 } | 23 } |
| 22 | 24 |
| 23 void DevToolsAgentHost::Detach() { | 25 void DevToolsAgentHost::Detach() { |
| 24 SendMessageToAgent(new DevToolsAgentMsg_Detach(MSG_ROUTING_NONE)); | 26 SendMessageToAgent(new DevToolsAgentMsg_Detach(MSG_ROUTING_NONE)); |
| 25 } | 27 } |
| 26 | 28 |
| 27 void DevToolsAgentHost::NotifyCloseListener() { | 29 void DevToolsAgentHost::NotifyCloseListener() { |
| 28 if (close_listener_) { | 30 if (close_listener_) { |
| 29 close_listener_->AgentHostClosing(this); | 31 close_listener_->AgentHostClosing(this); |
| 30 close_listener_ = NULL; | 32 close_listener_ = NULL; |
| 31 } | 33 } |
| 32 } | 34 } |
| 33 | 35 |
| 36 } // namespace content |
| OLD | NEW |