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

Unified Diff: headless/public/headless_browser.cc

Issue 2810353003: Adds a command-line flag indicating an open and listening socket to (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into headlessport Created 3 years, 8 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/public/headless_browser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.cc
diff --git a/headless/public/headless_browser.cc b/headless/public/headless_browser.cc
index 64e31a85deb612ded4d8c3f338cd21a162852b5f..d68c02d94c7aa66831cab6de386397c4d2a58cb6 100644
--- a/headless/public/headless_browser.cc
+++ b/headless/public/headless_browser.cc
@@ -27,6 +27,7 @@ std::string GetProductNameAndVersion() {
Options::Options(int argc, const char** argv)
: argc(argc),
argv(argv),
+ devtools_socket_fd(0),
message_pump(nullptr),
single_process_mode(false),
disable_sandbox(false),
@@ -48,6 +49,10 @@ Options::~Options() {}
Options& Options::operator=(Options&& options) = default;
+bool Options::DevtoolsServerEnabled() {
+ return (devtools_endpoint.address().IsValid() || devtools_socket_fd != 0);
+}
+
Builder::Builder(int argc, const char** argv) : options_(argc, argv) {}
Builder::Builder() : options_(0, nullptr) {}
@@ -70,6 +75,11 @@ Builder& Builder::EnableDevToolsServer(const net::IPEndPoint& endpoint) {
return *this;
}
+Builder& Builder::EnableDevToolsServer(const size_t socket_fd) {
+ options_.devtools_socket_fd = socket_fd;
+ return *this;
+}
+
Builder& Builder::SetMessagePump(base::MessagePump* message_pump) {
options_.message_pump = message_pump;
return *this;
« no previous file with comments | « headless/public/headless_browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698