Index: content/public/browser/devtools_target_list.h |
diff --git a/content/public/browser/devtools_target_list.h b/content/public/browser/devtools_target_list.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..29b5cbad2973dd4447743a65566650f7e77d8629 |
--- /dev/null |
+++ b/content/public/browser/devtools_target_list.h |
@@ -0,0 +1,41 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ |
+#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ |
+ |
+#include <map> |
+#include <string> |
+ |
+#include "base/memory/ref_counted.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+class DevToolsAgentHost; |
+ |
+class CONTENT_EXPORT DevToolsTargetList { |
+ public: |
+ static DevToolsTargetList* GetInstance(); |
+ |
+ typedef std::map<std::string, scoped_refptr<DevToolsAgentHost> > AgentsMap; |
+ 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.
|
+ |
+ 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.
|
+ |
+ 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.
|
+ |
+ DevToolsAgentHost* ForIdentifier(const std::string& id); |
+ |
+ private: |
+ AgentsMap agents_map_; |
+ |
+ std::string BindDevToolsAgentHost(DevToolsAgentHost* agent_host); |
+ |
+ void GarbageCollect(); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ |