| 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 "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" | 8 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" |
| 9 #include "chrome/browser/ui/webui/devtools_ui.h" | 9 #include "chrome/browser/ui/webui/devtools_ui.h" |
| 10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 if (!port) { | 40 if (!port) { |
| 41 // The client requested an ephemeral port. Must write the selected | 41 // The client requested an ephemeral port. Must write the selected |
| 42 // port to a well-known location in the profile directory to | 42 // port to a well-known location in the profile directory to |
| 43 // bootstrap the connection process. | 43 // bootstrap the connection process. |
| 44 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); | 44 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); |
| 45 DCHECK(result); | 45 DCHECK(result); |
| 46 } | 46 } |
| 47 | 47 |
| 48 scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory> factory( | 48 scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory> factory( |
| 49 new TCPServerSocketFactory(ip, port, 1)); | 49 new TCPServerSocketFactory(ip, port, 1)); |
| 50 devtools_http_handler_ = content::DevToolsHttpHandler::Start( | 50 devtools_http_handler_.reset(content::DevToolsHttpHandler::Start( |
| 51 factory.Pass(), | 51 factory.Pass(), |
| 52 "", | 52 "", |
| 53 new BrowserListTabContentsProvider(host_desktop_type), | 53 new BrowserListTabContentsProvider(host_desktop_type), |
| 54 output_dir); | 54 output_dir)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 RemoteDebuggingServer::~RemoteDebuggingServer() { | 57 RemoteDebuggingServer::~RemoteDebuggingServer() { |
| 58 devtools_http_handler_->Stop(); | |
| 59 } | 58 } |
| OLD | NEW |