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

Unified Diff: headless/app/headless_shell_switches.cc

Issue 2810353003: Adds a command-line flag indicating an open and listening socket to (Closed)
Patch Set: Responded to dvallet's comments. 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
Index: headless/app/headless_shell_switches.cc
diff --git a/headless/app/headless_shell_switches.cc b/headless/app/headless_shell_switches.cc
index f20a60657f77c388713a5828ba428fe600e2d35a..e1e14119b0af785fc236a50009a828120ce42f39 100644
--- a/headless/app/headless_shell_switches.cc
+++ b/headless/app/headless_shell_switches.cc
@@ -31,6 +31,15 @@ const char kProxyServer[] = "proxy-server";
// so exposing it too widely can be a security risk.
const char kRemoteDebuggingAddress[] = "remote-debugging-address";
+// The given value is the fd of a socket already opened by the parent process.
+// This allows automation to provide a listening socket for clients to connect
+// to before chrome is fully fired up. In particular, a parent process can
+// open the port, exec headles chrome, and connect to the devtools port
+// immediately. Waiting for chrome to be ready is then handled by the first
+// read from the port, which will block until chrome is ready. No polling is
+// needed.
+const char kRemoteDebuggingSocketFd[] = "remote-debugging-socket-fd";
+
// Runs a read-eval-print loop that allows the user to evaluate Javascript
// expressions.
const char kRepl[] = "repl";

Powered by Google App Engine
This is Rietveld 408576698