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
3 // found in the LICENSE file.
5 #include "xwalk/runtime/browser/devtools/remote_debugging_server.h"
7 #include "xwalk/runtime/browser/devtools/xwalk_devtools_delegate.h"
8 #include "xwalk/runtime/browser/runtime_context.h"
9 #include "content/public/browser/devtools_http_handler.h"
10 #include "net/socket/tcp_listen_socket.h"
14 RemoteDebuggingServer::RemoteDebuggingServer(
15 RuntimeContext* runtime_context,
16 const std::string& ip,
18 const std::string& frontend_url) {
19 devtools_http_handler_ = content::DevToolsHttpHandler::Start(
20 new net::TCPListenSocketFactory(ip, port),
22 new XWalkDevToolsDelegate(runtime_context));
25 RemoteDebuggingServer::~RemoteDebuggingServer() {
26 devtools_http_handler_->Stop();