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

Unified Diff: components/devtools_discovery/devtools_target_descriptor.h

Issue 1114503002: [DevTools] Cleanup DevToolsTarget and DevToolsManagerDelegate after moving to devtools_discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devtools-discovery-chrome
Patch Set: Created 5 years, 8 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
« no previous file with comments | « components/devtools_discovery/devtools_discovery_manager.h ('k') | components/devtools_http_handler.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/devtools_discovery/devtools_discovery_manager.h ('k') | components/devtools_http_handler.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698