Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: content/public/browser/devtools_agent_host.h

Issue 2833213002: DevTools: retain DTAH in all the targets to match their life time. (Closed)
Patch Set: cast test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_http_handler.cc ('k') | content/public/browser/devtools_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698