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

Side by Side Diff: content/shell/browser/shell_devtools_manager_delegate.cc

Issue 680943002: [DevTools] Migrate DevToolsHttpHandlerDelegate::CreateSocketForTethering to StreamSocket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 1 month 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
« no previous file with comments | « content/public/browser/devtools_http_handler_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/shell/browser/shell_devtools_manager_delegate.h" 5 #include "content/shell/browser/shell_devtools_manager_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { 173 class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate {
174 public: 174 public:
175 explicit ShellDevToolsDelegate(BrowserContext* browser_context); 175 explicit ShellDevToolsDelegate(BrowserContext* browser_context);
176 ~ShellDevToolsDelegate() override; 176 ~ShellDevToolsDelegate() override;
177 177
178 // DevToolsHttpHandlerDelegate implementation. 178 // DevToolsHttpHandlerDelegate implementation.
179 std::string GetDiscoveryPageHTML() override; 179 std::string GetDiscoveryPageHTML() override;
180 bool BundlesFrontendResources() override; 180 bool BundlesFrontendResources() override;
181 base::FilePath GetDebugFrontendDir() override; 181 base::FilePath GetDebugFrontendDir() override;
182 scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( 182 scoped_ptr<net::ServerSocket> CreateSocketForTethering(
183 net::StreamListenSocket::Delegate* delegate,
184 std::string* name) override; 183 std::string* name) override;
185 184
186 private: 185 private:
187 BrowserContext* browser_context_; 186 BrowserContext* browser_context_;
188 187
189 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate); 188 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate);
190 }; 189 };
191 190
192 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context) 191 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context)
193 : browser_context_(browser_context) { 192 : browser_context_(browser_context) {
(...skipping 16 matching lines...) Expand all
210 return false; 209 return false;
211 #else 210 #else
212 return true; 211 return true;
213 #endif 212 #endif
214 } 213 }
215 214
216 base::FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { 215 base::FilePath ShellDevToolsDelegate::GetDebugFrontendDir() {
217 return base::FilePath(); 216 return base::FilePath();
218 } 217 }
219 218
220 scoped_ptr<net::StreamListenSocket> 219 scoped_ptr<net::ServerSocket>
221 ShellDevToolsDelegate::CreateSocketForTethering( 220 ShellDevToolsDelegate::CreateSocketForTethering(std::string* name) {
222 net::StreamListenSocket::Delegate* delegate, 221 return scoped_ptr<net::ServerSocket>();
223 std::string* name) {
224 return scoped_ptr<net::StreamListenSocket>();
225 } 222 }
226 223
227 } // namespace 224 } // namespace
228 225
229 // ShellDevToolsManagerDelegate ---------------------------------------------- 226 // ShellDevToolsManagerDelegate ----------------------------------------------
230 227
231 // static 228 // static
232 DevToolsHttpHandler* 229 DevToolsHttpHandler*
233 ShellDevToolsManagerDelegate::CreateHttpHandler( 230 ShellDevToolsManagerDelegate::CreateHttpHandler(
234 BrowserContext* browser_context) { 231 BrowserContext* browser_context) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 271
275 void ShellDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) { 272 void ShellDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) {
276 TargetList targets; 273 TargetList targets;
277 for (const auto& agent_host : DevToolsAgentHost::GetOrCreateAll()) { 274 for (const auto& agent_host : DevToolsAgentHost::GetOrCreateAll()) {
278 targets.push_back(new Target(agent_host)); 275 targets.push_back(new Target(agent_host));
279 } 276 }
280 callback.Run(targets); 277 callback.Run(targets);
281 } 278 }
282 279
283 } // namespace content 280 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/devtools_http_handler_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698