OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 12 |
12 RemoteDebuggingServer::RemoteDebuggingServer(Profile* profile, | 13 RemoteDebuggingServer::RemoteDebuggingServer(Profile* profile, |
13 const std::string& ip, | 14 const std::string& ip, |
14 int port, | 15 int port, |
15 const std::string& frontend_url) { | 16 const std::string& frontend_url) { |
16 // Initialize DevTools data source. | 17 // Initialize DevTools data source. |
17 DevToolsUI::RegisterDevToolsDataSource(profile); | 18 DevToolsUI::RegisterDevToolsDataSource(profile); |
18 | 19 |
19 devtools_http_handler_ = | 20 devtools_http_handler_ = |
20 DevToolsHttpProtocolHandler::Start(ip, | 21 content::DevToolsHttpHandler::Start(ip, |
21 port, | 22 port, |
22 frontend_url, | 23 frontend_url, |
23 new BrowserListTabContentsProvider()); | 24 new BrowserListTabContentsProvider()); |
24 } | 25 } |
25 | 26 |
26 RemoteDebuggingServer::~RemoteDebuggingServer() { | 27 RemoteDebuggingServer::~RemoteDebuggingServer() { |
27 devtools_http_handler_->Stop(); | 28 devtools_http_handler_->Stop(); |
28 } | 29 } |
OLD | NEW |