Index: content/public/browser/devtools_target.h |
diff --git a/content/public/browser/devtools_target.h b/content/public/browser/devtools_target.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cfd0d55096e2e9cb3fa8ae1918f4c324afd86541 |
--- /dev/null |
+++ b/content/public/browser/devtools_target.h |
@@ -0,0 +1,63 @@ |
+// Copyright (c) 2013 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_H_ |
+#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/time/time.h" |
+#include "content/common/content_export.h" |
+#include "content/public/browser/devtools_agent_host.h" |
+#include "url/gurl.h" |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT DevToolsTarget |
+ : public base::RefCountedThreadSafe<DevToolsTarget> { |
pfeldman
2013/10/01 14:10:24
No need to be thread safe.
Vladislav Kaznacheev
2013/10/01 15:00:16
Done.
|
+ public: |
+ // Returns the unique target id. |
+ virtual std::string GetId() const = 0; |
+ |
+ // Returns the target type (to be used by a client to group targets). |
+ 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<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; |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<DevToolsTarget>; |
+ |
+ virtual ~DevToolsTarget() {} |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_ |