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 #include <utility> |
10 | 11 |
11 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
12 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/sequence_checker.h" | 16 #include "base/sequence_checker.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
18 #include "content/common/devtools_messages.h" | 19 #include "content/common/devtools_messages.h" |
19 #include "content/common/frame_messages.h" | 20 #include "content/common/frame_messages.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 if (error.critical) | 335 if (error.critical) |
335 failed = true; | 336 failed = true; |
336 errors->Append(std::move(error_value)); | 337 errors->Append(std::move(error_value)); |
337 } | 338 } |
338 | 339 |
339 WebString url = | 340 WebString url = |
340 frame_->GetWebFrame()->GetDocument().ManifestURL().GetString(); | 341 frame_->GetWebFrame()->GetDocument().ManifestURL().GetString(); |
341 result->SetString("url", url.Utf16()); | 342 result->SetString("url", url.Utf16()); |
342 if (!failed) | 343 if (!failed) |
343 result->SetString("data", debug_info.raw_data); | 344 result->SetString("data", debug_info.raw_data); |
344 result->Set("errors", errors.release()); | 345 result->Set("errors", std::move(errors)); |
345 response->Set("result", result.release()); | 346 response->Set("result", std::move(result)); |
346 | 347 |
347 std::string json_message; | 348 std::string json_message; |
348 base::JSONWriter::Write(*response, &json_message); | 349 base::JSONWriter::Write(*response, &json_message); |
349 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, | 350 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, |
350 json_message, std::string()); | 351 json_message, std::string()); |
351 } | 352 } |
352 | 353 |
353 } // namespace content | 354 } // namespace content |
OLD | NEW |