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/debugger/remote_debugging_server.h" | 5 #include "chrome/browser/debugger/remote_debugging_server.h" |
6 | 6 |
7 #include "chrome/browser/debugger/browser_list_tabcontents_provider.h" | 7 #include "chrome/browser/debugger/browser_list_tabcontents_provider.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 9 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
10 #include "chrome/browser/ui/webui/devtools_ui.h" | 10 #include "chrome/browser/ui/webui/devtools_ui.h" |
11 #include "content/public/browser/devtools_http_handler.h" | 11 #include "content/public/browser/devtools_http_handler.h" |
12 #include "net/base/tcp_listen_socket.h" | |
12 | 13 |
13 RemoteDebuggingServer::RemoteDebuggingServer(Profile* profile, | 14 RemoteDebuggingServer::RemoteDebuggingServer(Profile* profile, |
14 const std::string& ip, | 15 const std::string& ip, |
15 int port, | 16 int port, |
16 const std::string& frontend_url) { | 17 const std::string& frontend_url) { |
17 // Initialize DevTools data source. | 18 // Initialize DevTools data source. |
18 DevToolsUI::RegisterDevToolsDataSource(profile); | 19 DevToolsUI::RegisterDevToolsDataSource(profile); |
19 | 20 |
20 net::URLRequestContextGetter* request_context_getter = | 21 net::URLRequestContextGetter* request_context_getter = |
21 profile->GetRequestContext(); | 22 profile->GetRequestContext(); |
22 devtools_http_handler_ = | 23 |
23 content::DevToolsHttpHandler::Start(ip, | 24 devtools_http_handler_ = content::DevToolsHttpHandler::Start( |
24 port, | 25 frontend_url, |
25 frontend_url, | 26 new net::TCPListenSocketFactory factory(ip, port), |
pfeldman
2012/05/14 11:12:00
Remove " factory"
Philippe
2012/05/14 12:36:52
Wow indeed. Evil copy and paste. I'm surprised tha
| |
26 request_context_getter, | 27 request_context_getter, |
27 new BrowserListTabContentsProvider()); | 28 new BrowserListTabContentsProvider()); |
28 } | 29 } |
29 | 30 |
30 RemoteDebuggingServer::~RemoteDebuggingServer() { | 31 RemoteDebuggingServer::~RemoteDebuggingServer() { |
31 devtools_http_handler_->Stop(); | 32 devtools_http_handler_->Stop(); |
32 } | 33 } |
OLD | NEW |