OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/debugger_wrapper.h" | 5 #include "chrome/browser/debugger/debugger_wrapper.h" |
6 | 6 |
7 #include "chrome/browser/debugger/debugger_remote_service.h" | 7 #include "chrome/browser/debugger/debugger_remote_service.h" |
8 #include "chrome/browser/debugger/devtools_protocol_handler.h" | 8 #include "chrome/browser/debugger/devtools_protocol_handler.h" |
9 #include "chrome/browser/debugger/devtools_remote_service.h" | 9 #include "chrome/browser/debugger/devtools_remote_service.h" |
| 10 #include "chrome/browser/debugger/extension_ports_remote_service.h" |
10 | 11 |
11 DebuggerWrapper::DebuggerWrapper(int port) { | 12 DebuggerWrapper::DebuggerWrapper(int port) { |
12 if (port > 0) { | 13 if (port > 0) { |
13 proto_handler_ = new DevToolsProtocolHandler(port); | 14 proto_handler_ = new DevToolsProtocolHandler(port); |
14 proto_handler_->RegisterDestination( | 15 proto_handler_->RegisterDestination( |
15 new DevToolsRemoteService(proto_handler_), | 16 new DevToolsRemoteService(proto_handler_), |
16 DevToolsRemoteService::kToolName); | 17 DevToolsRemoteService::kToolName); |
17 proto_handler_->RegisterDestination( | 18 proto_handler_->RegisterDestination( |
18 new DebuggerRemoteService(proto_handler_), | 19 new DebuggerRemoteService(proto_handler_), |
19 DebuggerRemoteService::kToolName); | 20 DebuggerRemoteService::kToolName); |
| 21 proto_handler_->RegisterDestination( |
| 22 new ExtensionPortsRemoteService(proto_handler_), |
| 23 ExtensionPortsRemoteService::kToolName); |
20 proto_handler_->Start(); | 24 proto_handler_->Start(); |
21 } | 25 } |
22 } | 26 } |
23 | 27 |
24 DebuggerWrapper::~DebuggerWrapper() { | 28 DebuggerWrapper::~DebuggerWrapper() { |
25 if (proto_handler_.get() != NULL) { | 29 if (proto_handler_.get() != NULL) { |
26 proto_handler_->Stop(); | 30 proto_handler_->Stop(); |
27 } | 31 } |
28 } | 32 } |
OLD | NEW |