| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 for (const auto& error : debug_info.errors) { | 298 for (const auto& error : debug_info.errors) { |
| 299 base::DictionaryValue* error_value = new base::DictionaryValue(); | 299 base::DictionaryValue* error_value = new base::DictionaryValue(); |
| 300 errors->Append(error_value); | 300 errors->Append(error_value); |
| 301 error_value->SetString("message", error.message); | 301 error_value->SetString("message", error.message); |
| 302 error_value->SetBoolean("critical", error.critical); | 302 error_value->SetBoolean("critical", error.critical); |
| 303 error_value->SetInteger("line", error.line); | 303 error_value->SetInteger("line", error.line); |
| 304 error_value->SetInteger("column", error.column); | 304 error_value->SetInteger("column", error.column); |
| 305 if (error.critical) | 305 if (error.critical) |
| 306 failed = true; | 306 failed = true; |
| 307 } | 307 } |
| 308 |
| 309 WebString url = frame_->GetWebFrame()->document().manifestURL().string(); |
| 310 result->SetString("url", url); |
| 308 if (!failed) | 311 if (!failed) |
| 309 result->SetString("data", debug_info.raw_data); | 312 result->SetString("data", debug_info.raw_data); |
| 310 result->Set("errors", errors.release()); | 313 result->Set("errors", errors.release()); |
| 311 response->Set("result", result.release()); | 314 response->Set("result", result.release()); |
| 312 | 315 |
| 313 std::string json_message; | 316 std::string json_message; |
| 314 base::JSONWriter::Write(*response, &json_message); | 317 base::JSONWriter::Write(*response, &json_message); |
| 315 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, | 318 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, |
| 316 json_message, std::string()); | 319 json_message, std::string()); |
| 317 } | 320 } |
| 318 | 321 |
| 319 } // namespace content | 322 } // namespace content |
| OLD | NEW |