Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "content/common/content_export.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class DevToolsAgentHost; | |
| 17 | |
| 18 class CONTENT_EXPORT DevToolsTargetList { | |
| 19 public: | |
| 20 static DevToolsTargetList* GetInstance(); | |
| 21 | |
| 22 typedef std::map<std::string, scoped_refptr<DevToolsAgentHost> > AgentsMap; | |
| 23 | |
| 24 AgentsMap::iterator begin() { return agents_map_.begin(); } | |
|
pfeldman
2013/03/04 11:43:01
I still prefer vector::iterator as the return type
Vladislav Kaznacheev
2013/03/04 14:30:03
Discussed offline, agreed to keep as is.
On 2013/0
| |
| 25 | |
| 26 AgentsMap::iterator end() { return agents_map_.end(); } | |
| 27 | |
| 28 void Refresh(); | |
| 29 | |
| 30 void Register(DevToolsAgentHost* agent_host); | |
| 31 | |
| 32 DevToolsAgentHost* Lookup(const std::string& id); | |
| 33 | |
| 34 private: | |
| 35 AgentsMap agents_map_; | |
| 36 | |
| 37 void GarbageCollect(); | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ | |
| OLD | NEW |