| 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 // Implements the Chrome Extensions Debugger API. | 5 // Implements the Chrome Extensions Debugger API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" | 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 base::Bind(&DebuggerGetTargetsFunction::SendTargetList, this, list)); | 722 base::Bind(&DebuggerGetTargetsFunction::SendTargetList, this, list)); |
| 723 return true; | 723 return true; |
| 724 } | 724 } |
| 725 | 725 |
| 726 void DebuggerGetTargetsFunction::SendTargetList( | 726 void DebuggerGetTargetsFunction::SendTargetList( |
| 727 const std::vector<DevToolsTargetImpl*>& target_list) { | 727 const std::vector<DevToolsTargetImpl*>& target_list) { |
| 728 std::unique_ptr<base::ListValue> result(new base::ListValue()); | 728 std::unique_ptr<base::ListValue> result(new base::ListValue()); |
| 729 for (size_t i = 0; i < target_list.size(); ++i) | 729 for (size_t i = 0; i < target_list.size(); ++i) |
| 730 result->Append(SerializeTarget(*target_list[i])); | 730 result->Append(SerializeTarget(*target_list[i])); |
| 731 STLDeleteContainerPointers(target_list.begin(), target_list.end()); | 731 STLDeleteContainerPointers(target_list.begin(), target_list.end()); |
| 732 SetResult(result.release()); | 732 SetResult(std::move(result)); |
| 733 SendResponse(true); | 733 SendResponse(true); |
| 734 } | 734 } |
| 735 | 735 |
| 736 } // namespace extensions | 736 } // namespace extensions |
| OLD | NEW |