Index: components/devtools_discovery/devtools_target_descriptor.h |
diff --git a/components/devtools_discovery/devtools_target_descriptor.h b/components/devtools_discovery/devtools_target_descriptor.h |
index 2e5b104738ac06267f0caab4a9ccb6f9f83c5f0e..9b3200dd65a53d14adaaea508cb744946b2d1697 100644 |
--- a/components/devtools_discovery/devtools_target_descriptor.h |
+++ b/components/devtools_discovery/devtools_target_descriptor.h |
@@ -11,7 +11,6 @@ |
#include "base/basictypes.h" |
#include "base/memory/ref_counted.h" |
#include "base/time/time.h" |
-#include "content/public/browser/devtools_target.h" |
#include "url/gurl.h" |
namespace content { |
@@ -24,12 +23,46 @@ namespace devtools_discovery { |
// and can be used to manipulate the target and query its details. |
// Instantiation and discovery of DevToolsTargetDescriptor instances |
// is the responsibility of DevToolsDiscoveryManager. |
-// TODO(dgozman): remove content::DevToolsTarget once every embedder migrates |
-// to this descriptor. |
-class DevToolsTargetDescriptor : public content::DevToolsTarget { |
+class DevToolsTargetDescriptor { |
public: |
using List = std::vector<DevToolsTargetDescriptor*>; |
- ~DevToolsTargetDescriptor() override {} |
+ virtual ~DevToolsTargetDescriptor() {} |
+ |
+ // Returns the unique target id. |
+ virtual std::string GetId() const = 0; |
+ |
+ // Returns the id of the parent target, or empty string if no parent. |
+ virtual std::string GetParentId() const = 0; |
+ |
+ // Returns the target type. |
+ virtual std::string GetType() const = 0; |
+ |
+ // Returns the target title. |
+ virtual std::string GetTitle() const = 0; |
+ |
+ // Returns the target description. |
+ virtual std::string GetDescription() const = 0; |
+ |
+ // Returns the url associated with this target. |
+ virtual GURL GetURL() const = 0; |
+ |
+ // Returns the favicon url for this target. |
+ virtual GURL GetFaviconURL() const = 0; |
+ |
+ // Returns the time when the target was last active. |
+ virtual base::TimeTicks GetLastActivityTime() const = 0; |
+ |
+ // Returns true if the debugger is attached to the target. |
+ virtual bool IsAttached() const = 0; |
+ |
+ // Returns the agent host for this target. |
+ virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const = 0; |
+ |
+ // Activates the target. Returns false if the operation failed. |
+ virtual bool Activate() const = 0; |
+ |
+ // Closes the target. Returns false if the operation failed. |
+ virtual bool Close() const = 0; |
}; |
} // namespace devtools_discovery |