| 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 <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 AttachedClientHosts::AttachedClientHosts() { | 264 AttachedClientHosts::AttachedClientHosts() { |
| 265 } | 265 } |
| 266 | 266 |
| 267 AttachedClientHosts::~AttachedClientHosts() { | 267 AttachedClientHosts::~AttachedClientHosts() { |
| 268 } | 268 } |
| 269 | 269 |
| 270 // static | 270 // static |
| 271 AttachedClientHosts* AttachedClientHosts::GetInstance() { | 271 AttachedClientHosts* AttachedClientHosts::GetInstance() { |
| 272 return Singleton<AttachedClientHosts>::get(); | 272 return base::Singleton<AttachedClientHosts>::get(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void AttachedClientHosts::Add(ExtensionDevToolsClientHost* client_host) { | 275 void AttachedClientHosts::Add(ExtensionDevToolsClientHost* client_host) { |
| 276 client_hosts_.insert(client_host); | 276 client_hosts_.insert(client_host); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void AttachedClientHosts::Remove(ExtensionDevToolsClientHost* client_host) { | 279 void AttachedClientHosts::Remove(ExtensionDevToolsClientHost* client_host) { |
| 280 client_hosts_.erase(client_host); | 280 client_hosts_.erase(client_host); |
| 281 } | 281 } |
| 282 | 282 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 const std::vector<DevToolsTargetImpl*>& target_list) { | 745 const std::vector<DevToolsTargetImpl*>& target_list) { |
| 746 scoped_ptr<base::ListValue> result(new base::ListValue()); | 746 scoped_ptr<base::ListValue> result(new base::ListValue()); |
| 747 for (size_t i = 0; i < target_list.size(); ++i) | 747 for (size_t i = 0; i < target_list.size(); ++i) |
| 748 result->Append(SerializeTarget(*target_list[i])); | 748 result->Append(SerializeTarget(*target_list[i])); |
| 749 STLDeleteContainerPointers(target_list.begin(), target_list.end()); | 749 STLDeleteContainerPointers(target_list.begin(), target_list.end()); |
| 750 SetResult(result.release()); | 750 SetResult(result.release()); |
| 751 SendResponse(true); | 751 SendResponse(true); |
| 752 } | 752 } |
| 753 | 753 |
| 754 } // namespace extensions | 754 } // namespace extensions |
| OLD | NEW |