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

Unified Diff: headless/public/headless_browser.h

Issue 1781193004: headless: Make it possible to configure an HTTP proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/lib/headless_web_contents_browsertest.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.h
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index 8302c0fc22b23663fdce71c5186a3cb33c9e3f9b..8a38a2621d443ae371ad1213d9a430a804450f18 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "headless/public/headless_export.h"
+#include "net/base/host_port_pair.h"
#include "net/base/ip_endpoint.h"
namespace base {
@@ -67,8 +68,14 @@ struct HeadlessBrowser::Options {
std::string user_agent;
std::string navigator_platform;
+ // Address at which DevTools should listen for connections. Disabled by
+ // default.
net::IPEndPoint devtools_endpoint;
+ // Address of the HTTP/HTTPS proxy server to use. The system proxy settings
+ // are used by default.
+ net::HostPortPair proxy_server;
+
// Optional message pump that overrides the default. Must outlive the browser.
base::MessagePump* message_pump;
@@ -79,11 +86,13 @@ struct HeadlessBrowser::Options {
class HeadlessBrowser::Options::Builder {
public:
Builder(int argc, const char** argv);
+ Builder();
~Builder();
Builder& SetUserAgent(const std::string& user_agent);
Builder& EnableDevToolsServer(const net::IPEndPoint& endpoint);
Builder& SetMessagePump(base::MessagePump* message_pump);
+ Builder& SetProxyServer(const net::HostPortPair& proxy_server);
Options Build();
« no previous file with comments | « headless/lib/headless_web_contents_browsertest.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698