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

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: Addressed comments, split the patch in two 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..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_

Powered by Google App Engine
This is Rietveld 408576698