Index: chrome/browser/debugger/devtools_protocol_handler.cc |
diff --git a/chrome/browser/debugger/devtools_protocol_handler.cc b/chrome/browser/debugger/devtools_protocol_handler.cc |
index 6e72ef030139faa0150f0eca4ca80e4c5ea39684..1e9bf02d5b3ec7b44e1a42499f313fa8b2daa5f5 100644 |
--- a/chrome/browser/debugger/devtools_protocol_handler.cc |
+++ b/chrome/browser/debugger/devtools_protocol_handler.cc |
@@ -7,8 +7,28 @@ |
#include "base/logging.h" |
#include "chrome/browser/browser_thread.h" |
#include "chrome/browser/debugger/inspectable_tab_proxy.h" |
+#include "chrome/browser/debugger/debugger_remote_service.h" |
#include "chrome/browser/debugger/devtools_remote_message.h" |
#include "chrome/browser/debugger/devtools_remote_listen_socket.h" |
+#include "chrome/browser/debugger/devtools_remote_service.h" |
+#include "chrome/browser/debugger/extension_ports_remote_service.h" |
+ |
+// static |
+DevToolsProtocolHandler* DevToolsProtocolHandler::Start(int port) { |
+ scoped_refptr<DevToolsProtocolHandler> proto_handler = |
+ new DevToolsProtocolHandler(port); |
+ proto_handler->RegisterDestination( |
+ new DevToolsRemoteService(proto_handler), |
+ DevToolsRemoteService::kToolName); |
+ proto_handler->RegisterDestination( |
+ new DebuggerRemoteService(proto_handler), |
+ DebuggerRemoteService::kToolName); |
+ proto_handler->RegisterDestination( |
+ new ExtensionPortsRemoteService(proto_handler), |
+ ExtensionPortsRemoteService::kToolName); |
+ proto_handler->Start(); |
+ return proto_handler.get(); |
yurys
2011/01/31 14:58:24
Please return scoped_refptr instead.
pfeldman
2011/01/31 15:15:54
Done.
|
+} |
DevToolsProtocolHandler::DevToolsProtocolHandler(int port) |
: port_(port), |