OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return scoped_ptr<net::ServerSocket>( | 76 return scoped_ptr<net::ServerSocket>( |
77 new net::TCPServerSocket(NULL, net::NetLog::Source())); | 77 new net::TCPServerSocket(NULL, net::NetLog::Source())); |
78 } | 78 } |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); | 80 DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); |
81 }; | 81 }; |
82 #endif | 82 #endif |
83 | 83 |
84 scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> | 84 scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> |
85 CreateSocketFactory() { | 85 CreateSocketFactory() { |
86 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 86 const base::CommandLine& command_line = |
| 87 *base::CommandLine::ForCurrentProcess(); |
87 #if defined(OS_ANDROID) | 88 #if defined(OS_ANDROID) |
88 std::string socket_name = "content_shell_devtools_remote"; | 89 std::string socket_name = "content_shell_devtools_remote"; |
89 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) { | 90 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) { |
90 socket_name = command_line.GetSwitchValueASCII( | 91 socket_name = command_line.GetSwitchValueASCII( |
91 switches::kRemoteDebuggingSocketName); | 92 switches::kRemoteDebuggingSocketName); |
92 } | 93 } |
93 return scoped_ptr<DevToolsHttpHandler::ServerSocketFactory>( | 94 return scoped_ptr<DevToolsHttpHandler::ServerSocketFactory>( |
94 new UnixDomainServerSocketFactory(socket_name)); | 95 new UnixDomainServerSocketFactory(socket_name)); |
95 #else | 96 #else |
96 // See if the user specified a port on the command line (useful for | 97 // See if the user specified a port on the command line (useful for |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 271 |
271 void ShellDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) { | 272 void ShellDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) { |
272 TargetList targets; | 273 TargetList targets; |
273 for (const auto& agent_host : DevToolsAgentHost::GetOrCreateAll()) { | 274 for (const auto& agent_host : DevToolsAgentHost::GetOrCreateAll()) { |
274 targets.push_back(new Target(agent_host)); | 275 targets.push_back(new Target(agent_host)); |
275 } | 276 } |
276 callback.Run(targets); | 277 callback.Run(targets); |
277 } | 278 } |
278 | 279 |
279 } // namespace content | 280 } // namespace content |
OLD | NEW |