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/debugger/devtools_http_handler_impl.h" | 5 #include "content/browser/debugger/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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost( | 541 DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost( |
542 rvh); | 542 rvh); |
543 if (manager->GetDevToolsClientHostFor(agent)) { | 543 if (manager->GetDevToolsClientHostFor(agent)) { |
544 Send500(connection_id, "Target with given id is being inspected: " + | 544 Send500(connection_id, "Target with given id is being inspected: " + |
545 page_id); | 545 page_id); |
546 return; | 546 return; |
547 } | 547 } |
548 | 548 |
549 DevToolsClientHostImpl* client_host = | 549 DevToolsClientHostImpl* client_host = |
550 new DevToolsClientHostImpl(thread_->message_loop(), | 550 new DevToolsClientHostImpl(thread_->message_loop(), |
551 server_, | 551 server_.get(), |
552 connection_id); | 552 connection_id); |
553 connection_to_client_host_ui_[connection_id] = client_host; | 553 connection_to_client_host_ui_[connection_id] = client_host; |
554 | 554 |
555 manager->RegisterDevToolsClientHostFor(agent, client_host); | 555 manager->RegisterDevToolsClientHostFor(agent, client_host); |
556 | 556 |
557 AcceptWebSocket(connection_id, request); | 557 AcceptWebSocket(connection_id, request); |
558 } | 558 } |
559 | 559 |
560 void DevToolsHttpHandlerImpl::OnWebSocketMessageUI( | 560 void DevToolsHttpHandlerImpl::OnWebSocketMessageUI( |
561 int connection_id, | 561 int connection_id, |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 page_info.id.c_str())); | 712 page_info.id.c_str())); |
713 std::string devtools_frontend_url = GetFrontendURLInternal( | 713 std::string devtools_frontend_url = GetFrontendURLInternal( |
714 page_info.id.c_str(), | 714 page_info.id.c_str(), |
715 host); | 715 host); |
716 dictionary->SetString("devtoolsFrontendUrl", devtools_frontend_url); | 716 dictionary->SetString("devtoolsFrontendUrl", devtools_frontend_url); |
717 } | 717 } |
718 return dictionary; | 718 return dictionary; |
719 } | 719 } |
720 | 720 |
721 } // namespace content | 721 } // namespace content |
OLD | NEW |