| 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 "content/browser/devtools/devtools_http_handler_impl.h" | 5 #include "content/browser/devtools/devtools_http_handler_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 std::string browser_prefix = "/devtools/browser"; | 320 std::string browser_prefix = "/devtools/browser"; |
| 321 size_t browser_pos = request.path.find(browser_prefix); | 321 size_t browser_pos = request.path.find(browser_prefix); |
| 322 if (browser_pos == 0) { | 322 if (browser_pos == 0) { |
| 323 if (browser_target_) { | 323 if (browser_target_) { |
| 324 server_->Send500(connection_id, "Another client already attached"); | 324 server_->Send500(connection_id, "Another client already attached"); |
| 325 return; | 325 return; |
| 326 } | 326 } |
| 327 browser_target_ = new DevToolsBrowserTarget(server_.get(), connection_id); | 327 browser_target_ = new DevToolsBrowserTarget(server_.get(), connection_id); |
| 328 browser_target_->RegisterDomainHandler( | 328 browser_target_->RegisterDomainHandler( |
| 329 devtools::Tracing::kName, | 329 devtools::Tracing::kName, |
| 330 new DevToolsTracingHandler(), | 330 new DevToolsTracingHandler(DevToolsTracingHandler::Browser), |
| 331 true /* handle on UI thread */); | 331 true /* handle on UI thread */); |
| 332 browser_target_->RegisterDomainHandler( | 332 browser_target_->RegisterDomainHandler( |
| 333 TetheringHandler::kDomain, | 333 TetheringHandler::kDomain, |
| 334 new TetheringHandler(delegate_.get()), | 334 new TetheringHandler(delegate_.get()), |
| 335 false /* handle on this thread */); | 335 false /* handle on this thread */); |
| 336 browser_target_->RegisterDomainHandler( | 336 browser_target_->RegisterDomainHandler( |
| 337 devtools::SystemInfo::kName, | 337 devtools::SystemInfo::kName, |
| 338 new DevToolsSystemInfoHandler(), | 338 new DevToolsSystemInfoHandler(), |
| 339 true /* handle on UI thread */); | 339 true /* handle on UI thread */); |
| 340 | 340 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 id.c_str(), | 780 id.c_str(), |
| 781 host); | 781 host); |
| 782 dictionary->SetString( | 782 dictionary->SetString( |
| 783 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); | 783 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); |
| 784 } | 784 } |
| 785 | 785 |
| 786 return dictionary; | 786 return dictionary; |
| 787 } | 787 } |
| 788 | 788 |
| 789 } // namespace content | 789 } // namespace content |
| OLD | NEW |