| 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/renderer/devtools/devtools_agent.h" | 5 #include "content/renderer/devtools/devtools_agent.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { | 287 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { |
| 288 return frame_->GetWebFrame()->devToolsAgent(); | 288 return frame_->GetWebFrame()->devToolsAgent(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 bool DevToolsAgent::IsAttached() { | 291 bool DevToolsAgent::IsAttached() { |
| 292 return is_attached_; | 292 return is_attached_; |
| 293 } | 293 } |
| 294 | 294 |
| 295 void DevToolsAgent::GotManifest(int session_id, | 295 void DevToolsAgent::GotManifest(int session_id, |
| 296 int call_id, | 296 int call_id, |
| 297 const GURL& manifest_url, |
| 297 const Manifest& manifest, | 298 const Manifest& manifest, |
| 298 const ManifestDebugInfo& debug_info) { | 299 const ManifestDebugInfo& debug_info) { |
| 299 if (!is_attached_) | 300 if (!is_attached_) |
| 300 return; | 301 return; |
| 301 | 302 |
| 302 std::unique_ptr<base::DictionaryValue> response(new base::DictionaryValue()); | 303 std::unique_ptr<base::DictionaryValue> response(new base::DictionaryValue()); |
| 303 response->SetInteger("id", call_id); | 304 response->SetInteger("id", call_id); |
| 304 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); | 305 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); |
| 305 std::unique_ptr<base::ListValue> errors(new base::ListValue()); | 306 std::unique_ptr<base::ListValue> errors(new base::ListValue()); |
| 306 | 307 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 323 result->Set("errors", errors.release()); | 324 result->Set("errors", errors.release()); |
| 324 response->Set("result", result.release()); | 325 response->Set("result", result.release()); |
| 325 | 326 |
| 326 std::string json_message; | 327 std::string json_message; |
| 327 base::JSONWriter::Write(*response, &json_message); | 328 base::JSONWriter::Write(*response, &json_message); |
| 328 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, | 329 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, |
| 329 json_message, std::string()); | 330 json_message, std::string()); |
| 330 } | 331 } |
| 331 | 332 |
| 332 } // namespace content | 333 } // namespace content |
| OLD | NEW |