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

Unified Diff: content/public/browser/devtools_agent_host.h

Issue 459403002: DevTools: Added service workers to remote debugging targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: content/public/browser/devtools_agent_host.h
diff --git a/content/public/browser/devtools_agent_host.h b/content/public/browser/devtools_agent_host.h
index be02843731f42b5bf5a97b8d6a81891e2b548fc6..ddd3ad2d56ab0a20f752b5136128fa65133306e0 100644
--- a/content/public/browser/devtools_agent_host.h
+++ b/content/public/browser/devtools_agent_host.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
+#include "url/gurl.h"
namespace content {
@@ -21,6 +22,15 @@ class WebContents;
class CONTENT_EXPORT DevToolsAgentHost
: public base::RefCounted<DevToolsAgentHost> {
public:
+ // Return value of GetType for agent host associated with WebContents.
+ static const char kTypeWebContents[];
+
+ // Return value of GetType for agent host associated with shared worker.
+ static const char kTypeWorker[];
+
+ // Return value of GetType for agent host associated with service worker.
+ static const char kTypeServiceWorker[];
jam 2014/08/15 17:35:45 why aren't these an enum?
+
// Returns DevToolsAgentHost with a given |id| or NULL of it does not exist.
static scoped_refptr<DevToolsAgentHost> GetForId(const std::string& id);
@@ -46,8 +56,10 @@ class CONTENT_EXPORT DevToolsAgentHost
static bool IsDebuggerAttached(WebContents* web_contents);
- // Returns a list of all existing WebContents that can be debugged.
- static std::vector<WebContents*> GetInspectableWebContents();
+ typedef std::vector<scoped_refptr<DevToolsAgentHost> > List;
+
+ // Returns all possible DevToolsAgentHosts.
+ static List GetOrCreateAll();
// Returns true if there is a client attached.
virtual bool IsAttached() = 0;
@@ -71,6 +83,21 @@ class CONTENT_EXPORT DevToolsAgentHost
// Returns true if DevToolsAgentHost is for worker.
virtual bool IsWorker() const = 0;
+ // Returns agent host type.
+ virtual std::string GetType() = 0;
+
+ // Returns agent host title.
+ virtual std::string GetTitle() = 0;
+
+ // Returns url associated with agent host.
+ virtual GURL GetURL() = 0;
+
+ // Activates agent host. Returns false if the operation failed.
+ virtual bool Activate() = 0;
+
+ // Closes agent host. Returns false if the operation failed.
+ virtual bool Close() = 0;
+
protected:
friend class base::RefCounted<DevToolsAgentHost>;
virtual ~DevToolsAgentHost() {}
« no previous file with comments | « content/browser/devtools/render_view_devtools_agent_host.cc ('k') | content/shell/browser/shell_devtools_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698