summaryrefslogtreecommitdiffstats
path: root/content/public/browser/devtools_agent_host.h
diff options
context:
space:
mode:
authorkaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 08:47:54 +0000
committerkaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 08:47:54 +0000
commitead05635816265f14f92243baa56f40d4a31c01e (patch)
treef7ec7ca43de2cd36a26b4547816acf6a7580a274 /content/public/browser/devtools_agent_host.h
parent3e5a076165f61312818e92ab712ade50e210c696 (diff)
downloadchromium_src-ead05635816265f14f92243baa56f40d4a31c01e.zip
chromium_src-ead05635816265f14f92243baa56f40d4a31c01e.tar.gz
chromium_src-ead05635816265f14f92243baa56f40d4a31c01e.tar.bz2
This is required to simplify the implementation of chrome.debugger.getTargets.
BUG=179342 Review URL: https://codereview.chromium.org/12319114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/devtools_agent_host.h')
-rw-r--r--content/public/browser/devtools_agent_host.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/content/public/browser/devtools_agent_host.h b/content/public/browser/devtools_agent_host.h
index 533c31d..8395b2d 100644
--- a/content/public/browser/devtools_agent_host.h
+++ b/content/public/browser/devtools_agent_host.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -35,16 +36,22 @@ class CONTENT_EXPORT DevToolsAgentHost
static bool IsDebuggerAttached(WebContents* web_contents);
- // Detaches given |rvh| from the agent host temporarily and returns a cookie
- // that allows to reattach another rvh to that agen thost later. Returns -1 if
- // there is no agent host associated with the |rvh|.
- static int DisconnectRenderViewHost(RenderViewHost* rvh);
+ // Detaches given |rvh| from the agent host temporarily and returns the agent
+ // host id that allows to reattach another rvh to that agent host later.
+ // Returns empty string if there is no agent host associated with the |rvh|.
+ static std::string DisconnectRenderViewHost(RenderViewHost* rvh);
// Reattaches agent host detached with DisconnectRenderViewHost method above
// to |rvh|.
- static void ConnectRenderViewHost(int agent_host_cookie,
+ static void ConnectRenderViewHost(const std::string& agent_host_cookie,
RenderViewHost* rvh);
+ // Returns a list of all existing RenderViewHost's that can be debugged.
+ static std::vector<RenderViewHost*> GetValidRenderViewHosts();
+
+ // Returns the unique id of the agent.
+ virtual std::string GetId() = 0;
+
// Returns render view host instance for this host if any.
virtual RenderViewHost* GetRenderViewHost() = 0;