Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: headless/lib/browser/headless_devtools.cc

Issue 2013483002: headless: Make HeadlessBrowser::Options move-only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_browser_main_parts.cc ('k') | headless/lib/browser/headless_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698