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

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

Issue 2047833002: DevTools: introduce browser domain for basic target discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 6 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 | « content/content_browser.gypi ('k') | content/shell/browser/shell_devtools_frontend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4b8bc0d0dc8abdc0141eefbbb05ded30f6cb16e..f5ef494282cd859b610bf2580dcd62e09268da9e 100644
--- a/content/public/browser/devtools_agent_host.h
+++ b/content/public/browser/devtools_agent_host.h
@@ -108,17 +108,25 @@ class CONTENT_EXPORT DevToolsAgentHost
// Returns all possible DevToolsAgentHosts.
static List GetOrCreateAll();
- // Client attaches to this agent host to start debugging it.
- virtual void AttachClient(DevToolsAgentHostClient* client) = 0;
+ // Attaches |client| to this agent host to start debugging.
+ // Returns true iff attach succeeded.
+ virtual bool AttachClient(DevToolsAgentHostClient* client) = 0;
+
+ // Attaches |client| to this agent host to start debugging. Disconnects
+ // any existing clients.
+ virtual void ForceAttachClient(DevToolsAgentHostClient* client) = 0;
// Already attached client detaches from this agent host to stop debugging it.
- virtual void DetachClient() = 0;
+ // Returns true iff detach succeeded.
+ virtual bool DetachClient(DevToolsAgentHostClient* client) = 0;
// Returns true if there is a client attached.
virtual bool IsAttached() = 0;
- // Sends a message to the agent. Returns true if the message is handled.
- virtual bool DispatchProtocolMessage(const std::string& message) = 0;
+ // Sends |message| from |client| to the agent.
+ // Returns true if the message is dispatched and handled.
+ virtual bool DispatchProtocolMessage(DevToolsAgentHostClient* client,
+ const std::string& message) = 0;
// Starts inspecting element at position (|x|, |y|) in the specified page.
virtual void InspectElement(int x, int y) = 0;
« no previous file with comments | « content/content_browser.gypi ('k') | content/shell/browser/shell_devtools_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698