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 "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "components/devtools_http_handler/devtools_http_handler.h" | 9 #include "components/devtools_http_handler/devtools_http_handler.h" |
10 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" | 10 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 content::DevToolsExternalAgentProxyDelegate* | 86 content::DevToolsExternalAgentProxyDelegate* |
87 HeadlessDevToolsDelegate::HandleWebSocketConnection(const std::string& path) { | 87 HeadlessDevToolsDelegate::HandleWebSocketConnection(const std::string& path) { |
88 return nullptr; | 88 return nullptr; |
89 } | 89 } |
90 | 90 |
91 } // namespace | 91 } // namespace |
92 | 92 |
93 std::unique_ptr<DevToolsHttpHandler> CreateLocalDevToolsHttpHandler( | 93 std::unique_ptr<DevToolsHttpHandler> CreateLocalDevToolsHttpHandler( |
94 HeadlessBrowserContext* browser_context) { | 94 HeadlessBrowserContext* browser_context) { |
95 const net::IPEndPoint& endpoint = | 95 const net::IPEndPoint& endpoint = |
96 browser_context->options().devtools_endpoint; | 96 browser_context->options()->devtools_endpoint; |
97 std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> socket_factory( | 97 std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> socket_factory( |
98 new TCPServerSocketFactory(endpoint)); | 98 new TCPServerSocketFactory(endpoint)); |
99 return base::WrapUnique(new DevToolsHttpHandler( | 99 return base::WrapUnique(new DevToolsHttpHandler( |
100 std::move(socket_factory), std::string(), new HeadlessDevToolsDelegate(), | 100 std::move(socket_factory), std::string(), new HeadlessDevToolsDelegate(), |
101 browser_context->GetPath(), base::FilePath(), std::string(), | 101 browser_context->GetPath(), base::FilePath(), std::string(), |
102 browser_context->options().user_agent)); | 102 browser_context->options()->user_agent)); |
103 } | 103 } |
104 | 104 |
105 } // namespace headless | 105 } // namespace headless |
OLD | NEW |