| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Informs the hosted agent that a client host has detached. | 31 // Informs the hosted agent that a client host has detached. |
| 32 virtual void Detach() = 0; | 32 virtual void Detach() = 0; |
| 33 | 33 |
| 34 // Sends a message to the agent. | 34 // Sends a message to the agent. |
| 35 virtual void DispatchProtocolMessage(const std::string& message) = 0; | 35 virtual void DispatchProtocolMessage(const std::string& message) = 0; |
| 36 | 36 |
| 37 // Opens the inspector for this host. | 37 // Opens the inspector for this host. |
| 38 void Inspect(BrowserContext* browser_context); | 38 void Inspect(BrowserContext* browser_context); |
| 39 | 39 |
| 40 // DevToolsAgentHost implementation. | 40 // DevToolsAgentHost implementation. |
| 41 virtual void AttachClient(DevToolsAgentHostClient* client) OVERRIDE; | 41 virtual void AttachClient(DevToolsAgentHostClient* client) override; |
| 42 virtual void DetachClient() OVERRIDE; | 42 virtual void DetachClient() override; |
| 43 virtual bool IsAttached() OVERRIDE; | 43 virtual bool IsAttached() override; |
| 44 virtual void InspectElement(int x, int y) OVERRIDE; | 44 virtual void InspectElement(int x, int y) override; |
| 45 virtual std::string GetId() OVERRIDE; | 45 virtual std::string GetId() override; |
| 46 virtual WebContents* GetWebContents() OVERRIDE; | 46 virtual WebContents* GetWebContents() override; |
| 47 virtual void DisconnectWebContents() OVERRIDE; | 47 virtual void DisconnectWebContents() override; |
| 48 virtual void ConnectWebContents(WebContents* wc) OVERRIDE; | 48 virtual void ConnectWebContents(WebContents* wc) override; |
| 49 virtual bool IsWorker() const OVERRIDE; | 49 virtual bool IsWorker() const override; |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 DevToolsAgentHostImpl(); | 52 DevToolsAgentHostImpl(); |
| 53 virtual ~DevToolsAgentHostImpl(); | 53 virtual ~DevToolsAgentHostImpl(); |
| 54 | 54 |
| 55 void HostClosed(); | 55 void HostClosed(); |
| 56 void SendMessageToClient(const std::string& message); | 56 void SendMessageToClient(const std::string& message); |
| 57 static void NotifyCallbacks(DevToolsAgentHostImpl* agent_host, bool attached); | 57 static void NotifyCallbacks(DevToolsAgentHostImpl* agent_host, bool attached); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 friend class DevToolsAgentHost; // for static methods | 60 friend class DevToolsAgentHost; // for static methods |
| 61 | 61 |
| 62 const std::string id_; | 62 const std::string id_; |
| 63 DevToolsAgentHostClient* client_; | 63 DevToolsAgentHostClient* client_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace content | 66 } // namespace content |
| 67 | 67 |
| 68 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 68 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
| OLD | NEW |