Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / devtools / remote_debugging_server.cc
blob50e43e7538efd55a5134c04000798404a66a7fa7
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 "chrome/browser/devtools/remote_debugging_server.h"
7 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h"
8 #include "chrome/browser/ui/webui/devtools_ui.h"
9 #include "content/public/browser/devtools_http_handler.h"
10 #include "net/socket/tcp_listen_socket.h"
12 RemoteDebuggingServer::RemoteDebuggingServer(
13 chrome::HostDesktopType host_desktop_type,
14 const std::string& ip,
15 int port,
16 const std::string& frontend_url) {
17 devtools_http_handler_ = content::DevToolsHttpHandler::Start(
18 new net::TCPListenSocketFactory(ip, port),
19 frontend_url,
20 new BrowserListTabContentsProvider(host_desktop_type));
23 RemoteDebuggingServer::~RemoteDebuggingServer() {
24 devtools_http_handler_->Stop();