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/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 WebContents* DevToolsAgentHostImpl::GetWebContents() { | 212 WebContents* DevToolsAgentHostImpl::GetWebContents() { |
213 return NULL; | 213 return NULL; |
214 } | 214 } |
215 | 215 |
216 void DevToolsAgentHostImpl::DisconnectWebContents() { | 216 void DevToolsAgentHostImpl::DisconnectWebContents() { |
217 } | 217 } |
218 | 218 |
219 void DevToolsAgentHostImpl::ConnectWebContents(WebContents* wc) { | 219 void DevToolsAgentHostImpl::ConnectWebContents(WebContents* wc) { |
220 } | 220 } |
221 | 221 |
222 bool DevToolsAgentHostImpl::Inspect() { | 222 bool DevToolsAgentHostImpl::Inspect(BrowserContext* context) { |
223 DevToolsManager* manager = DevToolsManager::GetInstance(); | 223 DevToolsManager* manager = DevToolsManager::GetInstance(); |
224 if (manager->delegate()) { | 224 if (manager->delegate()) { |
225 manager->delegate()->Inspect(this); | 225 manager->delegate()->Inspect(this, context); |
226 return true; | 226 return true; |
227 } | 227 } |
228 return false; | 228 return false; |
229 } | 229 } |
230 | 230 |
231 void DevToolsAgentHostImpl::SendProtocolResponse(int session_id, | 231 void DevToolsAgentHostImpl::SendProtocolResponse(int session_id, |
232 const std::string& message) { | 232 const std::string& message) { |
233 SendMessageToClient(session_id, message); | 233 SendMessageToClient(session_id, message); |
234 } | 234 } |
235 | 235 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 if (message_buffer_.size() != message_buffer_size_) | 354 if (message_buffer_.size() != message_buffer_size_) |
355 return false; | 355 return false; |
356 callback_.Run(chunk.session_id, message_buffer_); | 356 callback_.Run(chunk.session_id, message_buffer_); |
357 message_buffer_ = std::string(); | 357 message_buffer_ = std::string(); |
358 message_buffer_size_ = 0; | 358 message_buffer_size_ = 0; |
359 } | 359 } |
360 return true; | 360 return true; |
361 } | 361 } |
362 | 362 |
363 } // namespace content | 363 } // namespace content |
OLD | NEW |