OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/devtools/remote_debugging_server.h" | 5 #include "chromecast/browser/devtools/remote_debugging_server.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return; | 141 return; |
142 } | 142 } |
143 | 143 |
144 if (devtools_http_handler_) { | 144 if (devtools_http_handler_) { |
145 LOG(INFO) << "Stop old devtools: port=" << port_; | 145 LOG(INFO) << "Stop old devtools: port=" << port_; |
146 devtools_http_handler_.reset(); | 146 devtools_http_handler_.reset(); |
147 } | 147 } |
148 | 148 |
149 port_ = new_port; | 149 port_ = new_port; |
150 if (port_ > 0) { | 150 if (port_ > 0) { |
151 manager_delegate_.reset(new CastDevToolsManagerDelegate()); | |
152 devtools_http_handler_.reset(new DevToolsHttpHandler( | 151 devtools_http_handler_.reset(new DevToolsHttpHandler( |
153 CreateSocketFactory(port_), | 152 CreateSocketFactory(port_), |
154 GetFrontendUrl(), | 153 GetFrontendUrl(), |
155 new CastDevToolsDelegate(), | 154 new CastDevToolsDelegate(), |
156 manager_delegate_.get(), | |
157 base::FilePath(), | 155 base::FilePath(), |
158 base::FilePath(), | 156 base::FilePath(), |
159 std::string(), | 157 std::string(), |
160 GetUserAgent())); | 158 GetUserAgent())); |
161 LOG(INFO) << "Devtools started: port=" << port_; | 159 LOG(INFO) << "Devtools started: port=" << port_; |
162 } | 160 } |
163 } | 161 } |
164 | 162 |
165 } // namespace shell | 163 } // namespace shell |
166 } // namespace chromecast | 164 } // namespace chromecast |
OLD | NEW |