| 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 d0fad668b492522b6f0444cde903cc932d0fec08..2e618e56df330bf2460d6f5a7075f0773c694e08 100644
|
| --- a/content/browser/devtools/devtools_agent_host_impl.h
|
| +++ b/content/browser/devtools/devtools_agent_host_impl.h
|
| @@ -17,53 +17,45 @@ 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;
|
| -
|
| - 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(Client* client) OVERRIDE;
|
| + virtual void DetachClient() OVERRIDE;
|
| virtual bool IsAttached() OVERRIDE;
|
| -
|
| virtual void InspectElement(int x, int y) OVERRIDE;
|
| -
|
| virtual std::string GetId() OVERRIDE;
|
| -
|
| virtual RenderViewHost* GetRenderViewHost() OVERRIDE;
|
| -
|
| virtual void DisconnectRenderViewHost() OVERRIDE;
|
| -
|
| virtual void ConnectRenderViewHost(RenderViewHost* rvh) OVERRIDE;
|
| -
|
| virtual bool IsWorker() const OVERRIDE;
|
|
|
| protected:
|
| DevToolsAgentHostImpl();
|
| virtual ~DevToolsAgentHostImpl();
|
|
|
| - void NotifyCloseListener();
|
| + void HostClosed();
|
| + void SendMessageToClient(const std::string& message);
|
|
|
| private:
|
| - CloseListener* close_listener_;
|
| + friend class DevToolsAgentHost; // for static methods
|
| + void DetachInternal(DetachReason reason, bool need_detach);
|
| + static void NotifyCallbacks(DevToolsAgentHostImpl* agent_host, bool attached);
|
| +
|
| const std::string id_;
|
| + Client* client_;
|
| };
|
|
|
| } // namespace content
|
|
|