Index: content/browser/devtools/devtools_agent_host_impl.h |
diff --git a/content/browser/devtools/devtools_agent_host_impl.h b/content/browser/devtools/devtools_agent_host_impl.h |
index d20a8b793505146e0fd147a43f5623a50f1bc9d1..5afc0df7e153beaf2d048ba62dab442e9dcf51cf 100644 |
--- a/content/browser/devtools/devtools_agent_host_impl.h |
+++ b/content/browser/devtools/devtools_agent_host_impl.h |
@@ -17,53 +17,47 @@ class Message; |
namespace content { |
+class BrowserContext; |
+ |
// Describes interface for managing devtools agents from the browser process. |
class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost { |
public: |
- class CONTENT_EXPORT CloseListener { |
- public: |
- virtual void AgentHostClosing(DevToolsAgentHostImpl*) = 0; |
- protected: |
- virtual ~CloseListener() {} |
- }; |
- |
// Informs the hosted agent that a client host has attached. |
virtual void Attach() = 0; |
// Informs the hosted agent that a client host has detached. |
virtual void Detach() = 0; |
- // Sends a message to the agent hosted by this object. |
- virtual void DispatchOnInspectorBackend(const std::string& message) = 0; |
+ // Sends a message to the agent. |
+ virtual void DispatchProtocolMessage(const std::string& message) = 0; |
- void set_close_listener(CloseListener* listener) { |
- close_listener_ = listener; |
- } |
+ // Opens the inspector for this host. |
+ void Inspect(BrowserContext* browser_context); |
// DevToolsAgentHost implementation. |
+ virtual void AttachClient(DevToolsAgentHostClient* client) OVERRIDE; |
+ virtual void DetachClient() OVERRIDE; |
virtual bool IsAttached() OVERRIDE; |
- |
virtual void InspectElement(int x, int y) OVERRIDE; |
- |
virtual std::string GetId() OVERRIDE; |
- |
virtual WebContents* GetWebContents() OVERRIDE; |
- |
virtual void DisconnectWebContents() OVERRIDE; |
- |
- virtual void ConnectWebContents(WebContents* rvh) OVERRIDE; |
- |
+ virtual void ConnectWebContents(WebContents* wc) OVERRIDE; |
virtual bool IsWorker() const OVERRIDE; |
protected: |
DevToolsAgentHostImpl(); |
virtual ~DevToolsAgentHostImpl(); |
- void NotifyCloseListener(); |
+ void HostClosed(); |
+ void SendMessageToClient(const std::string& message); |
+ static void NotifyCallbacks(DevToolsAgentHostImpl* agent_host, bool attached); |
private: |
- CloseListener* close_listener_; |
+ friend class DevToolsAgentHost; // for static methods |
+ |
const std::string id_; |
+ DevToolsAgentHostClient* client_; |
}; |
} // namespace content |