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

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

Issue 349033009: DevTools: Added service workers to chrome://inspect/#devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed lifetime again Created 6 years, 5 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 dd18a53886b177a6fce02e3e1777d2564c224c3d..ff569d1e9146767fa8a4c11a9e18412d6f574270 100644
--- a/content/public/browser/devtools_agent_host.h
+++ b/content/public/browser/devtools_agent_host.h
@@ -9,8 +9,10 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
+#include "url/gurl.h"
namespace content {
@@ -43,6 +45,11 @@ class CONTENT_EXPORT DevToolsAgentHost
static scoped_refptr<DevToolsAgentHost> GetForWorker(int worker_process_id,
int worker_route_id);
+ typedef std::vector<scoped_refptr<DevToolsAgentHost> > List;
+ typedef base::Callback<void(const List&)> ListCallback;
+ // Returns all possible DevToolsAgentHosts
+ static void GetOrCreateAllHosts(const ListCallback& callback);
+
// Creates DevToolsAgentHost that communicates to the target by means of
// provided |delegate|. |delegate| ownership is passed to the created agent
// host.
@@ -51,9 +58,6 @@ class CONTENT_EXPORT DevToolsAgentHost
static bool IsDebuggerAttached(WebContents* web_contents);
- // Returns a list of all existing RenderViewHost's that can be debugged.
- static std::vector<RenderViewHost*> GetValidRenderViewHosts();
-
// Returns true if there is a client attached.
virtual bool IsAttached() = 0;
@@ -76,6 +80,9 @@ class CONTENT_EXPORT DevToolsAgentHost
// Returns true if DevToolsAgentHost is for worker.
virtual bool IsWorker() const = 0;
+ // Returns url associated with agent host.
+ virtual GURL GetURL() = 0;
+
protected:
friend class base::RefCounted<DevToolsAgentHost>;
virtual ~DevToolsAgentHost() {}
« no previous file with comments | « content/browser/service_worker/embedded_worker_instance.cc ('k') | content/shell/browser/shell_devtools_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698