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 "chrome/browser/devtools/remote_debugging_server.h" | 5 #include "chrome/browser/devtools/remote_debugging_server.h" |
6 | 6 |
7 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" | 7 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" |
8 #include "chrome/browser/ui/webui/devtools_ui.h" | 8 #include "chrome/browser/ui/webui/devtools_ui.h" |
9 #include "content/public/browser/devtools_http_handler.h" | 9 #include "content/public/browser/devtools_http_handler.h" |
10 #include "net/base/tcp_listen_socket.h" | 10 #include "net/socket/tcp_listen_socket.h" |
11 | 11 |
12 RemoteDebuggingServer::RemoteDebuggingServer( | 12 RemoteDebuggingServer::RemoteDebuggingServer( |
13 Profile* profile, | 13 Profile* profile, |
14 chrome::HostDesktopType host_desktop_type, | 14 chrome::HostDesktopType host_desktop_type, |
15 const std::string& ip, | 15 const std::string& ip, |
16 int port, | 16 int port, |
17 const std::string& frontend_url) { | 17 const std::string& frontend_url) { |
18 devtools_http_handler_ = content::DevToolsHttpHandler::Start( | 18 devtools_http_handler_ = content::DevToolsHttpHandler::Start( |
19 new net::TCPListenSocketFactory(ip, port), | 19 new net::TCPListenSocketFactory(ip, port), |
20 frontend_url, | 20 frontend_url, |
21 new BrowserListTabContentsProvider(profile, host_desktop_type)); | 21 new BrowserListTabContentsProvider(profile, host_desktop_type)); |
22 } | 22 } |
23 | 23 |
24 RemoteDebuggingServer::~RemoteDebuggingServer() { | 24 RemoteDebuggingServer::~RemoteDebuggingServer() { |
25 devtools_http_handler_->Stop(); | 25 devtools_http_handler_->Stop(); |
26 } | 26 } |
OLD | NEW |