Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Unified Diff: content/public/browser/devtools_target_list.h

Issue 12319114: Extract debugger target enumeration into a separate class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@debugger
Patch Set: Fixed compile Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698