| 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/guid.h" | 10 #include "base/guid.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void DevToolsAgentHostImpl::SendProtocolResponse(int session_id, | 155 void DevToolsAgentHostImpl::SendProtocolResponse(int session_id, |
| 156 const std::string& message) { | 156 const std::string& message) { |
| 157 SendMessageToClient(session_id, message); | 157 SendMessageToClient(session_id, message); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void DevToolsAgentHostImpl::SendProtocolNotification( | 160 void DevToolsAgentHostImpl::SendProtocolNotification( |
| 161 const std::string& message) { | 161 const std::string& message) { |
| 162 SendMessageToClient(session_id_, message); | 162 SendMessageToClient(session_id_, message); |
| 163 } | 163 } |
| 164 | 164 |
| 165 std::string DevToolsAgentHostImpl::GetUserAgentOverride() { |
| 166 return ""; |
| 167 } |
| 168 |
| 165 void DevToolsAgentHostImpl::HostClosed() { | 169 void DevToolsAgentHostImpl::HostClosed() { |
| 166 if (!client_) | 170 if (!client_) |
| 167 return; | 171 return; |
| 168 | 172 |
| 169 scoped_refptr<DevToolsAgentHostImpl> protect(this); | 173 scoped_refptr<DevToolsAgentHostImpl> protect(this); |
| 170 // Clear |client_| before notifying it. | 174 // Clear |client_| before notifying it. |
| 171 DevToolsAgentHostClient* client = client_; | 175 DevToolsAgentHostClient* client = client_; |
| 172 client_ = NULL; | 176 client_ = NULL; |
| 173 client->AgentHostClosed(this, false); | 177 client->AgentHostClosed(this, false); |
| 174 } | 178 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 285 |
| 282 if (chunk.is_last) { | 286 if (chunk.is_last) { |
| 283 CHECK(message_buffer_.size() == message_buffer_size_); | 287 CHECK(message_buffer_.size() == message_buffer_size_); |
| 284 callback_.Run(chunk.session_id, message_buffer_); | 288 callback_.Run(chunk.session_id, message_buffer_); |
| 285 message_buffer_ = std::string(); | 289 message_buffer_ = std::string(); |
| 286 message_buffer_size_ = 0; | 290 message_buffer_size_ = 0; |
| 287 } | 291 } |
| 288 } | 292 } |
| 289 | 293 |
| 290 } // namespace content | 294 } // namespace content |
| OLD | NEW |