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

Side by Side 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, 9 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698