| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 using CreateServerSocketCallback = | 88 using CreateServerSocketCallback = |
| 89 base::Callback<std::unique_ptr<net::ServerSocket>(std::string*)>; | 89 base::Callback<std::unique_ptr<net::ServerSocket>(std::string*)>; |
| 90 | 90 |
| 91 // Creates DevToolsAgentHost for the browser, which works with browser-wide | 91 // Creates DevToolsAgentHost for the browser, which works with browser-wide |
| 92 // debugging protocol. | 92 // debugging protocol. |
| 93 static scoped_refptr<DevToolsAgentHost> CreateForBrowser( | 93 static scoped_refptr<DevToolsAgentHost> CreateForBrowser( |
| 94 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, | 94 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, |
| 95 const CreateServerSocketCallback& socket_callback); | 95 const CreateServerSocketCallback& socket_callback); |
| 96 | 96 |
| 97 // Creates DevToolsAgentHost for discovery, which supports part of the |
| 98 // protocol to discover other agent hosts. |
| 99 static scoped_refptr<DevToolsAgentHost> CreateForDiscovery(); |
| 100 |
| 97 static bool IsDebuggerAttached(WebContents* web_contents); | 101 static bool IsDebuggerAttached(WebContents* web_contents); |
| 98 | 102 |
| 99 using List = std::vector<scoped_refptr<DevToolsAgentHost>>; | 103 using List = std::vector<scoped_refptr<DevToolsAgentHost>>; |
| 100 | 104 |
| 101 // Returns all DevToolsAgentHosts content is aware of. | 105 // Returns all DevToolsAgentHosts content is aware of. |
| 102 static List GetOrCreateAll(); | 106 static List GetOrCreateAll(); |
| 103 | 107 |
| 104 using DiscoveryCallback = base::Callback<void(List)>; | 108 using DiscoveryCallback = base::Callback<void(List)>; |
| 105 | 109 |
| 106 // Returns all possible DevToolsAgentHosts embedder is aware of. | 110 // Returns all possible DevToolsAgentHosts embedder is aware of. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 static void DetachAllClients(); | 210 static void DetachAllClients(); |
| 207 | 211 |
| 208 protected: | 212 protected: |
| 209 friend class base::RefCounted<DevToolsAgentHost>; | 213 friend class base::RefCounted<DevToolsAgentHost>; |
| 210 virtual ~DevToolsAgentHost() {} | 214 virtual ~DevToolsAgentHost() {} |
| 211 }; | 215 }; |
| 212 | 216 |
| 213 } // namespace content | 217 } // namespace content |
| 214 | 218 |
| 215 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 219 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |