| 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 #include "content/shell/shell_devtools_delegate.h" | 5 #include "content/shell/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 return new net::TCPListenSocketFactory("127.0.0.1", port); | 53 return new net::TCPListenSocketFactory("127.0.0.1", port); |
| 54 #endif | 54 #endif |
| 55 } | 55 } |
| 56 } // namespace | 56 } // namespace |
| 57 | 57 |
| 58 namespace content { | 58 namespace content { |
| 59 | 59 |
| 60 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context) | 60 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context) |
| 61 : browser_context_(browser_context) { | 61 : browser_context_(browser_context) { |
| 62 // Note that Content Shell always used bundled DevTools frontend, |
| 63 // even on Android, because the shell is used for running layout tests. |
| 62 devtools_http_handler_ = | 64 devtools_http_handler_ = |
| 63 DevToolsHttpHandler::Start(CreateSocketFactory(), std::string(), this); | 65 DevToolsHttpHandler::Start(CreateSocketFactory(), std::string(), this); |
| 64 } | 66 } |
| 65 | 67 |
| 66 ShellDevToolsDelegate::~ShellDevToolsDelegate() { | 68 ShellDevToolsDelegate::~ShellDevToolsDelegate() { |
| 67 } | 69 } |
| 68 | 70 |
| 69 void ShellDevToolsDelegate::Stop() { | 71 void ShellDevToolsDelegate::Stop() { |
| 70 // The call below destroys this. | 72 // The call below destroys this. |
| 71 devtools_http_handler_->Stop(); | 73 devtools_http_handler_->Stop(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 110 } |
| 109 | 111 |
| 110 scoped_refptr<net::StreamListenSocket> | 112 scoped_refptr<net::StreamListenSocket> |
| 111 ShellDevToolsDelegate::CreateSocketForTethering( | 113 ShellDevToolsDelegate::CreateSocketForTethering( |
| 112 net::StreamListenSocket::Delegate* delegate, | 114 net::StreamListenSocket::Delegate* delegate, |
| 113 std::string* name) { | 115 std::string* name) { |
| 114 return NULL; | 116 return NULL; |
| 115 } | 117 } |
| 116 | 118 |
| 117 } // namespace content | 119 } // namespace content |
| OLD | NEW |