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 typedef AgentsMap::iterator iterator; | |
pfeldman
2013/03/01 14:28:17
Don't - AgentsMap::iterator is good enough.
Vladislav Kaznacheev
2013/03/01 16:16:38
Done.
| |
24 | |
25 AgentsMap& GetAgentsMap(); | |
pfeldman
2013/03/01 14:28:17
So we have a Target_List_ with a map interface and
Vladislav Kaznacheev
2013/03/01 16:16:38
Done.
| |
26 | |
27 std::string GetIdentifier(DevToolsAgentHost* agent_host); | |
pfeldman
2013/03/01 14:28:17
This one is really weird. Why is identifies not th
Vladislav Kaznacheev
2013/03/01 16:16:38
Done.
| |
28 | |
29 DevToolsAgentHost* ForIdentifier(const std::string& id); | |
30 | |
31 private: | |
32 AgentsMap agents_map_; | |
33 | |
34 std::string BindDevToolsAgentHost(DevToolsAgentHost* agent_host); | |
35 | |
36 void GarbageCollect(); | |
37 }; | |
38 | |
39 } // namespace content | |
40 | |
41 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ | |
OLD | NEW |