| 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_delegate.h" | 5 #include "content/shell/browser/shell_devtools_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 const char kTargetTypePage[] = "page"; | 45 const char kTargetTypePage[] = "page"; |
| 46 | 46 |
| 47 net::StreamListenSocketFactory* CreateSocketFactory() { | 47 net::StreamListenSocketFactory* CreateSocketFactory() { |
| 48 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 48 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 49 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
| 50 std::string socket_name = "content_shell_devtools_remote"; | 50 std::string socket_name = "content_shell_devtools_remote"; |
| 51 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) { | 51 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) { |
| 52 socket_name = command_line.GetSwitchValueASCII( | 52 socket_name = command_line.GetSwitchValueASCII( |
| 53 switches::kRemoteDebuggingSocketName); | 53 switches::kRemoteDebuggingSocketName); |
| 54 } | 54 } |
| 55 return new net::UnixDomainSocketWithAbstractNamespaceFactory( | 55 return new net::UnixDomainListenSocketWithAbstractNamespaceFactory( |
| 56 socket_name, "", base::Bind(&content::CanUserConnectToDevTools)); | 56 socket_name, "", base::Bind(&content::CanUserConnectToDevTools)); |
| 57 #else | 57 #else |
| 58 // See if the user specified a port on the command line (useful for | 58 // See if the user specified a port on the command line (useful for |
| 59 // automation). If not, use an ephemeral port by specifying 0. | 59 // automation). If not, use an ephemeral port by specifying 0. |
| 60 int port = 0; | 60 int port = 0; |
| 61 if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) { | 61 if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) { |
| 62 int temp_port; | 62 int temp_port; |
| 63 std::string port_str = | 63 std::string port_str = |
| 64 command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort); | 64 command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort); |
| 65 if (base::StringToInt(port_str, &temp_port) && | 65 if (base::StringToInt(port_str, &temp_port) && |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 | 210 |
| 211 scoped_ptr<net::StreamListenSocket> | 211 scoped_ptr<net::StreamListenSocket> |
| 212 ShellDevToolsDelegate::CreateSocketForTethering( | 212 ShellDevToolsDelegate::CreateSocketForTethering( |
| 213 net::StreamListenSocket::Delegate* delegate, | 213 net::StreamListenSocket::Delegate* delegate, |
| 214 std::string* name) { | 214 std::string* name) { |
| 215 return scoped_ptr<net::StreamListenSocket>(); | 215 return scoped_ptr<net::StreamListenSocket>(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace content | 218 } // namespace content |
| OLD | NEW |