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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 const net::HttpServerRequestInfo& request) { | 820 const net::HttpServerRequestInfo& request) { |
821 if (!thread_.get()) | 821 if (!thread_.get()) |
822 return; | 822 return; |
823 thread_->message_loop()->PostTask( | 823 thread_->message_loop()->PostTask( |
824 FROM_HERE, | 824 FROM_HERE, |
825 base::Bind(&net::HttpServer::AcceptWebSocket, server_.get(), | 825 base::Bind(&net::HttpServer::AcceptWebSocket, server_.get(), |
826 connection_id, request)); | 826 connection_id, request)); |
827 } | 827 } |
828 | 828 |
829 DevToolsHttpHandlerImpl::PageInfo | 829 DevToolsHttpHandlerImpl::PageInfo |
830 DevToolsHttpHandlerImpl::CreatePageInfo(RenderViewHost* rvh) | 830 DevToolsHttpHandlerImpl::CreatePageInfo(RenderViewHost* rvh) { |
831 { | |
832 RenderViewHostDelegate* host_delegate = rvh->GetDelegate(); | 831 RenderViewHostDelegate* host_delegate = rvh->GetDelegate(); |
833 scoped_refptr<DevToolsAgentHost> agent(DevToolsAgentHost::GetFor(rvh)); | 832 scoped_refptr<DevToolsAgentHost> agent(DevToolsAgentHost::GetFor(rvh)); |
834 DevToolsClientHost* client_host = DevToolsManager::GetInstance()-> | 833 DevToolsClientHost* client_host = DevToolsManager::GetInstance()-> |
835 GetDevToolsClientHostFor(agent); | 834 GetDevToolsClientHostFor(agent); |
836 PageInfo page_info; | 835 PageInfo page_info; |
837 page_info.id = binding_->GetIdentifier(agent); | 836 page_info.id = binding_->GetIdentifier(agent); |
838 page_info.attached = client_host != NULL; | 837 page_info.attached = client_host != NULL; |
839 page_info.url = host_delegate->GetURL().spec(); | 838 page_info.url = host_delegate->GetURL().spec(); |
840 | 839 |
841 WebContents* web_contents = host_delegate->GetAsWebContents(); | 840 WebContents* web_contents = host_delegate->GetAsWebContents(); |
(...skipping 27 matching lines...) Expand all Loading... |
869 page_info.id.c_str())); | 868 page_info.id.c_str())); |
870 std::string devtools_frontend_url = GetFrontendURLInternal( | 869 std::string devtools_frontend_url = GetFrontendURLInternal( |
871 page_info.id.c_str(), | 870 page_info.id.c_str(), |
872 host); | 871 host); |
873 dictionary->SetString("devtoolsFrontendUrl", devtools_frontend_url); | 872 dictionary->SetString("devtoolsFrontendUrl", devtools_frontend_url); |
874 } | 873 } |
875 return dictionary; | 874 return dictionary; |
876 } | 875 } |
877 | 876 |
878 } // namespace content | 877 } // namespace content |
OLD | NEW |