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

Side by Side Diff: components/devtools_discovery/devtools_target_descriptor.h

Issue 2289773002: Revert of DevTools: merge devtools target with devtools host, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_TARGET_DESCRIPTOR_H_ 5 #ifndef COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_TARGET_DESCRIPTOR_H_
6 #define COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_TARGET_DESCRIPTOR_H_ 6 #define COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_TARGET_DESCRIPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace content { 15 namespace content {
16 class DevToolsAgentHost; 16 class DevToolsAgentHost;
17 } 17 }
18 18
19 namespace devtools_discovery { 19 namespace devtools_discovery {
20 20
21 // DevToolsTargetDescriptor provides information about devtools target 21 // DevToolsTargetDescriptor provides information about devtools target
22 // and can be used to manipulate the target and query its details. 22 // and can be used to manipulate the target and query its details.
23 // Instantiation and discovery of DevToolsTargetDescriptor instances 23 // Instantiation and discovery of DevToolsTargetDescriptor instances
24 // is the responsibility of DevToolsDiscoveryManager. 24 // is the responsibility of DevToolsDiscoveryManager.
25 class DevToolsTargetDescriptor { 25 class DevToolsTargetDescriptor {
26 public: 26 public:
27 using List = std::vector<DevToolsTargetDescriptor*>; 27 using List = std::vector<DevToolsTargetDescriptor*>;
28 virtual ~DevToolsTargetDescriptor() {} 28 virtual ~DevToolsTargetDescriptor() {}
29 29
30 // Returns the unique target id.
31 virtual std::string GetId() const = 0;
32
33 // Returns the id of the parent target, or empty string if no parent.
34 virtual std::string GetParentId() const = 0;
35
36 // Returns the target type.
37 virtual std::string GetType() const = 0;
38
39 // Returns the target title.
40 virtual std::string GetTitle() const = 0;
41
42 // Returns the target description.
43 virtual std::string GetDescription() const = 0;
44
45 // Returns the url associated with this target.
46 virtual GURL GetURL() const = 0;
47
48 // Returns the favicon url for this target.
49 virtual GURL GetFaviconURL() const = 0;
50
51 // Returns the time when the target was last active.
52 virtual base::TimeTicks GetLastActivityTime() const = 0;
53
54 // Returns true if the debugger is attached to the target.
55 virtual bool IsAttached() const = 0;
56
30 // Returns the agent host for this target. 57 // Returns the agent host for this target.
31 virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const = 0; 58 virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const = 0;
59
60 // Activates the target. Returns false if the operation failed.
61 virtual bool Activate() const = 0;
62
63 // Closes the target. Returns false if the operation failed.
64 virtual bool Close() const = 0;
32 }; 65 };
33 66
34 } // namespace devtools_discovery 67 } // namespace devtools_discovery
35 68
36 #endif // COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_TARGET_DESCRIPTOR_H_ 69 #endif // COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_TARGET_DESCRIPTOR_H_
OLDNEW
« no previous file with comments | « components/devtools_discovery/devtools_discovery_manager.cc ('k') | components/devtools_http_handler/devtools_http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698