OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/devtools/devtools_agent_host_impl.h" | 5 #include "content/browser/devtools/devtools_agent_host_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 void DevToolsAgentHostImpl::ForceAttachClient(DevToolsAgentHostClient* client) { | 182 void DevToolsAgentHostImpl::ForceAttachClient(DevToolsAgentHostClient* client) { |
183 scoped_refptr<DevToolsAgentHostImpl> protect(this); | 183 scoped_refptr<DevToolsAgentHostImpl> protect(this); |
184 if (!sessions_.empty()) | 184 if (!sessions_.empty()) |
185 ForceDetachAllClients(true); | 185 ForceDetachAllClients(true); |
186 DCHECK(sessions_.empty()); | 186 DCHECK(sessions_.empty()); |
187 InnerAttachClient(client); | 187 InnerAttachClient(client); |
188 } | 188 } |
189 | 189 |
| 190 void DevToolsAgentHostImpl::AttachMultiClient(DevToolsAgentHostClient* client) { |
| 191 InnerAttachClient(client); |
| 192 } |
| 193 |
190 bool DevToolsAgentHostImpl::DetachClient(DevToolsAgentHostClient* client) { | 194 bool DevToolsAgentHostImpl::DetachClient(DevToolsAgentHostClient* client) { |
191 if (!SessionByClient(client)) | 195 if (!SessionByClient(client)) |
192 return false; | 196 return false; |
193 | 197 |
194 scoped_refptr<DevToolsAgentHostImpl> protect(this); | 198 scoped_refptr<DevToolsAgentHostImpl> protect(this); |
195 InnerDetachClient(client); | 199 InnerDetachClient(client); |
196 return true; | 200 return true; |
197 } | 201 } |
198 | 202 |
199 bool DevToolsAgentHostImpl::DispatchProtocolMessage( | 203 bool DevToolsAgentHostImpl::DispatchProtocolMessage( |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 } | 426 } |
423 | 427 |
424 void DevToolsMessageChunkProcessor::Reset() { | 428 void DevToolsMessageChunkProcessor::Reset() { |
425 message_buffer_ = std::string(); | 429 message_buffer_ = std::string(); |
426 message_buffer_size_ = 0; | 430 message_buffer_size_ = 0; |
427 state_cookie_ = std::string(); | 431 state_cookie_ = std::string(); |
428 last_call_id_ = 0; | 432 last_call_id_ = 0; |
429 } | 433 } |
430 | 434 |
431 } // namespace content | 435 } // namespace content |
OLD | NEW |