OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/debugger/devtools_protocol_handler.h" | 5 #include "chrome/browser/debugger/devtools_protocol_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/debugger/debugger_remote_service.h" | 9 #include "chrome/browser/debugger/debugger_remote_service.h" |
10 #include "chrome/browser/debugger/devtools_remote_listen_socket.h" | 10 #include "chrome/browser/debugger/devtools_remote_listen_socket.h" |
11 #include "chrome/browser/debugger/devtools_remote_message.h" | 11 #include "chrome/browser/debugger/devtools_remote_message.h" |
12 #include "chrome/browser/debugger/devtools_remote_service.h" | 12 #include "chrome/browser/debugger/devtools_remote_service.h" |
13 #include "chrome/browser/debugger/extension_ports_remote_service.h" | 13 #include "chrome/browser/debugger/extension_ports_remote_service.h" |
14 #include "chrome/browser/debugger/inspectable_tab_proxy.h" | 14 #include "chrome/browser/debugger/inspectable_tab_proxy.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 | 16 |
| 17 using content::BrowserThread; |
| 18 |
17 // static | 19 // static |
18 scoped_refptr<DevToolsProtocolHandler> DevToolsProtocolHandler::Start( | 20 scoped_refptr<DevToolsProtocolHandler> DevToolsProtocolHandler::Start( |
19 int port) { | 21 int port) { |
20 scoped_refptr<DevToolsProtocolHandler> proto_handler = | 22 scoped_refptr<DevToolsProtocolHandler> proto_handler = |
21 new DevToolsProtocolHandler(port); | 23 new DevToolsProtocolHandler(port); |
22 proto_handler->RegisterDestination( | 24 proto_handler->RegisterDestination( |
23 new DevToolsRemoteService(proto_handler), | 25 new DevToolsRemoteService(proto_handler), |
24 DevToolsRemoteService::kToolName); | 26 DevToolsRemoteService::kToolName); |
25 proto_handler->RegisterDestination( | 27 proto_handler->RegisterDestination( |
26 new DebuggerRemoteService(proto_handler), | 28 new DebuggerRemoteService(proto_handler), |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 connection_ = NULL; | 119 connection_ = NULL; |
118 for (ToolToListenerMap::const_iterator it = tool_to_listener_map_.begin(), | 120 for (ToolToListenerMap::const_iterator it = tool_to_listener_map_.begin(), |
119 end = tool_to_listener_map_.end(); | 121 end = tool_to_listener_map_.end(); |
120 it != end; | 122 it != end; |
121 ++it) { | 123 ++it) { |
122 BrowserThread::PostTask( | 124 BrowserThread::PostTask( |
123 BrowserThread::UI, FROM_HERE, | 125 BrowserThread::UI, FROM_HERE, |
124 base::Bind(&DevToolsRemoteListener::OnConnectionLost, it->second.get())); | 126 base::Bind(&DevToolsRemoteListener::OnConnectionLost, it->second.get())); |
125 } | 127 } |
126 } | 128 } |
OLD | NEW |