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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 std::string browser_prefix = "/devtools/browser"; | 373 std::string browser_prefix = "/devtools/browser"; |
374 size_t browser_pos = request.path.find(browser_prefix); | 374 size_t browser_pos = request.path.find(browser_prefix); |
375 if (browser_pos == 0) { | 375 if (browser_pos == 0) { |
376 scoped_refptr<DevToolsBrowserTarget> browser_target = | 376 scoped_refptr<DevToolsBrowserTarget> browser_target = |
377 new DevToolsBrowserTarget(server_.get(), connection_id); | 377 new DevToolsBrowserTarget(server_.get(), connection_id); |
378 browser_target->RegisterDomainHandler( | 378 browser_target->RegisterDomainHandler( |
379 devtools::Tracing::kName, | 379 devtools::Tracing::kName, |
380 new DevToolsTracingHandler(DevToolsTracingHandler::Browser), | 380 new DevToolsTracingHandler(DevToolsTracingHandler::Browser), |
381 true /* handle on UI thread */); | 381 true /* handle on UI thread */); |
382 browser_target->RegisterDomainHandler( | 382 browser_target->RegisterDomainHandler( |
383 TetheringHandler::kDomain, | 383 devtools::Tethering::kName, |
384 new TetheringHandler(delegate_.get()), | 384 new TetheringHandler(delegate_.get()), |
385 false /* handle on this thread */); | 385 false /* handle on this thread */); |
386 browser_target->RegisterDomainHandler( | 386 browser_target->RegisterDomainHandler( |
387 devtools::SystemInfo::kName, | 387 devtools::SystemInfo::kName, |
388 new DevToolsSystemInfoHandler(), | 388 new DevToolsSystemInfoHandler(), |
389 true /* handle on UI thread */); | 389 true /* handle on UI thread */); |
390 browser_targets_[connection_id] = browser_target; | 390 browser_targets_[connection_id] = browser_target; |
391 | 391 |
392 server_->SetSendBufferSize(connection_id, kSendBufferSizeForDevTools); | 392 server_->SetSendBufferSize(connection_id, kSendBufferSizeForDevTools); |
393 server_->AcceptWebSocket(connection_id, request); | 393 server_->AcceptWebSocket(connection_id, request); |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 id.c_str(), | 879 id.c_str(), |
880 host); | 880 host); |
881 dictionary->SetString( | 881 dictionary->SetString( |
882 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); | 882 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); |
883 } | 883 } |
884 | 884 |
885 return dictionary; | 885 return dictionary; |
886 } | 886 } |
887 | 887 |
888 } // namespace content | 888 } // namespace content |
OLD | NEW |