| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // protocol to discover other agent hosts. | 98 // protocol to discover other agent hosts. |
| 99 static scoped_refptr<DevToolsAgentHost> CreateForDiscovery(); | 99 static scoped_refptr<DevToolsAgentHost> CreateForDiscovery(); |
| 100 | 100 |
| 101 static bool IsDebuggerAttached(WebContents* web_contents); | 101 static bool IsDebuggerAttached(WebContents* web_contents); |
| 102 | 102 |
| 103 using List = std::vector<scoped_refptr<DevToolsAgentHost>>; | 103 using List = std::vector<scoped_refptr<DevToolsAgentHost>>; |
| 104 | 104 |
| 105 // Returns all DevToolsAgentHosts content is aware of. | 105 // Returns all DevToolsAgentHosts content is aware of. |
| 106 static List GetOrCreateAll(); | 106 static List GetOrCreateAll(); |
| 107 | 107 |
| 108 using DiscoveryCallback = base::Callback<void(List)>; | |
| 109 | |
| 110 // Returns all possible DevToolsAgentHosts embedder is aware of. | |
| 111 static void DiscoverAllHosts(const DiscoveryCallback& callback); | |
| 112 | |
| 113 // Starts remote debugging. | 108 // Starts remote debugging. |
| 114 // Takes ownership over |socket_factory|. | 109 // Takes ownership over |socket_factory|. |
| 115 // If |frontend_url| is empty, assumes it's bundled. | 110 // If |frontend_url| is empty, assumes it's bundled. |
| 116 // If |active_port_output_directory| is non-empty, it is assumed the | 111 // If |active_port_output_directory| is non-empty, it is assumed the |
| 117 // socket_factory was initialized with an ephemeral port (0). The | 112 // socket_factory was initialized with an ephemeral port (0). The |
| 118 // port selected by the OS will be written to a well-known file in | 113 // port selected by the OS will be written to a well-known file in |
| 119 // the output directory. | 114 // the output directory. |
| 120 static void StartRemoteDebuggingServer( | 115 static void StartRemoteDebuggingServer( |
| 121 std::unique_ptr<DevToolsSocketFactory> server_socket_factory, | 116 std::unique_ptr<DevToolsSocketFactory> server_socket_factory, |
| 122 const std::string& frontend_url, | 117 const std::string& frontend_url, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 static void DetachAllClients(); | 205 static void DetachAllClients(); |
| 211 | 206 |
| 212 protected: | 207 protected: |
| 213 friend class base::RefCounted<DevToolsAgentHost>; | 208 friend class base::RefCounted<DevToolsAgentHost>; |
| 214 virtual ~DevToolsAgentHost() {} | 209 virtual ~DevToolsAgentHost() {} |
| 215 }; | 210 }; |
| 216 | 211 |
| 217 } // namespace content | 212 } // namespace content |
| 218 | 213 |
| 219 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 214 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |