Chromium Code Reviews| 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)>; | 108 using DiscoveryCallback = base::Callback<void(List)>; |
|
dgozman
2017/04/22 00:00:45
Remove?
| |
| 109 | 109 |
| 110 // Returns all possible DevToolsAgentHosts embedder is aware of. | 110 // Returns all possible DevToolsAgentHosts embedder is aware of. |
| 111 static void DiscoverAllHosts(const DiscoveryCallback& callback); | 111 static DevToolsAgentHost::List DiscoverAllHosts(); |
| 112 | 112 |
| 113 // Starts remote debugging. | 113 // Starts remote debugging. |
| 114 // Takes ownership over |socket_factory|. | 114 // Takes ownership over |socket_factory|. |
| 115 // If |frontend_url| is empty, assumes it's bundled. | 115 // If |frontend_url| is empty, assumes it's bundled. |
| 116 // If |active_port_output_directory| is non-empty, it is assumed the | 116 // If |active_port_output_directory| is non-empty, it is assumed the |
| 117 // socket_factory was initialized with an ephemeral port (0). The | 117 // 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 | 118 // port selected by the OS will be written to a well-known file in |
| 119 // the output directory. | 119 // the output directory. |
| 120 static void StartRemoteDebuggingServer( | 120 static void StartRemoteDebuggingServer( |
| 121 std::unique_ptr<DevToolsSocketFactory> server_socket_factory, | 121 std::unique_ptr<DevToolsSocketFactory> server_socket_factory, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 static void DetachAllClients(); | 210 static void DetachAllClients(); |
| 211 | 211 |
| 212 protected: | 212 protected: |
| 213 friend class base::RefCounted<DevToolsAgentHost>; | 213 friend class base::RefCounted<DevToolsAgentHost>; |
| 214 virtual ~DevToolsAgentHost() {} | 214 virtual ~DevToolsAgentHost() {} |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace content | 217 } // namespace content |
| 218 | 218 |
| 219 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 219 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |