| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/debugger/remote_debugging_server.h" | |
| 6 | |
| 7 #include "chrome/browser/debugger/browser_list_tabcontents_provider.h" | |
| 8 #include "chrome/browser/ui/webui/devtools_ui.h" | |
| 9 #include "content/public/browser/devtools_http_handler.h" | |
| 10 #include "net/base/tcp_listen_socket.h" | |
| 11 | |
| 12 RemoteDebuggingServer::RemoteDebuggingServer(Profile* profile, | |
| 13 const std::string& ip, | |
| 14 int port, | |
| 15 const std::string& frontend_url) { | |
| 16 // Initialize DevTools data source. | |
| 17 DevToolsUI::RegisterDevToolsDataSource(profile); | |
| 18 | |
| 19 devtools_http_handler_ = content::DevToolsHttpHandler::Start( | |
| 20 new net::TCPListenSocketFactory(ip, port), | |
| 21 frontend_url, | |
| 22 new BrowserListTabContentsProvider(profile)); | |
| 23 } | |
| 24 | |
| 25 RemoteDebuggingServer::~RemoteDebuggingServer() { | |
| 26 devtools_http_handler_->Stop(); | |
| 27 } | |
| OLD | NEW |