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..fe0b56528a458b11d3c7b5e20dbec28478506655 |
--- /dev/null |
+++ b/content/public/browser/devtools_target_list.h |
@@ -0,0 +1,42 @@ |
+// 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; |
+ |
+ AgentsMap::iterator begin() { return agents_map_.begin(); } |
+ |
+ AgentsMap::iterator end() { return agents_map_.end(); } |
+ |
+ void Refresh(); |
pfeldman
2013/03/05 12:06:41
You don't need this.
Vladislav Kaznacheev
2013/03/05 13:35:44
Done.
|
+ |
+ void Register(DevToolsAgentHost* agent_host); |
pfeldman
2013/03/05 12:06:41
Why is this public?
Vladislav Kaznacheev
2013/03/05 13:35:44
This is required when a new agent host created via
|
+ |
+ DevToolsAgentHost* Lookup(const std::string& id); |
+ |
+ private: |
+ AgentsMap agents_map_; |
+ |
+ void GarbageCollect(); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_LIST_H_ |