OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "headless/lib/browser/headless_devtools.h" | 5 #include "headless/lib/browser/headless_devtools.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return nullptr; | 90 return nullptr; |
91 } | 91 } |
92 | 92 |
93 } // namespace | 93 } // namespace |
94 | 94 |
95 std::unique_ptr<DevToolsHttpHandler> CreateLocalDevToolsHttpHandler( | 95 std::unique_ptr<DevToolsHttpHandler> CreateLocalDevToolsHttpHandler( |
96 HeadlessBrowser::Options* options) { | 96 HeadlessBrowser::Options* options) { |
97 const net::IPEndPoint& endpoint = options->devtools_endpoint; | 97 const net::IPEndPoint& endpoint = options->devtools_endpoint; |
98 std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> socket_factory( | 98 std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> socket_factory( |
99 new TCPServerSocketFactory(endpoint)); | 99 new TCPServerSocketFactory(endpoint)); |
100 return base::WrapUnique(new DevToolsHttpHandler( | 100 return base::MakeUnique<DevToolsHttpHandler>( |
101 std::move(socket_factory), std::string(), new HeadlessDevToolsDelegate(), | 101 std::move(socket_factory), std::string(), new HeadlessDevToolsDelegate(), |
102 options->user_data_dir, // TODO(altimin): Figure a proper value for this. | 102 options->user_data_dir, // TODO(altimin): Figure a proper value for this. |
103 base::FilePath(), std::string(), options->user_agent)); | 103 base::FilePath(), std::string(), options->user_agent); |
104 } | 104 } |
105 | 105 |
106 } // namespace headless | 106 } // namespace headless |
OLD | NEW |