| 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_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // host. | 79 // host. |
| 80 static scoped_refptr<DevToolsAgentHost> Create( | 80 static scoped_refptr<DevToolsAgentHost> Create( |
| 81 DevToolsExternalAgentProxyDelegate* delegate); | 81 DevToolsExternalAgentProxyDelegate* delegate); |
| 82 | 82 |
| 83 using CreateServerSocketCallback = | 83 using CreateServerSocketCallback = |
| 84 base::Callback<scoped_ptr<net::ServerSocket>(std::string*)>; | 84 base::Callback<scoped_ptr<net::ServerSocket>(std::string*)>; |
| 85 | 85 |
| 86 // Creates DevToolsAgentHost for the browser, which works with browser-wide | 86 // Creates DevToolsAgentHost for the browser, which works with browser-wide |
| 87 // debugging protocol. | 87 // debugging protocol. |
| 88 static scoped_refptr<DevToolsAgentHost> CreateForBrowser( | 88 static scoped_refptr<DevToolsAgentHost> CreateForBrowser( |
| 89 scoped_refptr<base::MessageLoopProxy> tethering_message_loop, | 89 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, |
| 90 const CreateServerSocketCallback& socket_callback); | 90 const CreateServerSocketCallback& socket_callback); |
| 91 | 91 |
| 92 static bool IsDebuggerAttached(WebContents* web_contents); | 92 static bool IsDebuggerAttached(WebContents* web_contents); |
| 93 | 93 |
| 94 typedef std::vector<scoped_refptr<DevToolsAgentHost> > List; | 94 typedef std::vector<scoped_refptr<DevToolsAgentHost> > List; |
| 95 | 95 |
| 96 // Returns all possible DevToolsAgentHosts. | 96 // Returns all possible DevToolsAgentHosts. |
| 97 static List GetOrCreateAll(); | 97 static List GetOrCreateAll(); |
| 98 | 98 |
| 99 // Client attaches to this agent host to start debugging it. | 99 // Client attaches to this agent host to start debugging it. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 static void RemoveAgentStateCallback(const AgentStateCallback& callback); | 152 static void RemoveAgentStateCallback(const AgentStateCallback& callback); |
| 153 | 153 |
| 154 protected: | 154 protected: |
| 155 friend class base::RefCounted<DevToolsAgentHost>; | 155 friend class base::RefCounted<DevToolsAgentHost>; |
| 156 virtual ~DevToolsAgentHost() {} | 156 virtual ~DevToolsAgentHost() {} |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace content | 159 } // namespace content |
| 160 | 160 |
| 161 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 161 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |