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

Unified Diff: headless/lib/headless_content_main_delegate.cc

Issue 1991953002: Implement a runtime headless mode for Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 1 month 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/lib/headless_content_main_delegate.cc
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
index 193169ff8a0054b1c37ae94e3681165a451e9a26..8826c6b20fee69312de5a8cfd83ccfb205c7ff77 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -42,16 +42,16 @@ HeadlessContentMainDelegate::~HeadlessContentMainDelegate() {
bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ // Make sure all processes know that we're in headless mode.
+ if (!command_line->HasSwitch(switches::kHeadless))
+ command_line->AppendSwitch(switches::kHeadless);
+
if (browser_->options()->single_process_mode)
command_line->AppendSwitch(switches::kSingleProcess);
if (browser_->options()->disable_sandbox)
command_line->AppendSwitch(switches::kNoSandbox);
- // The headless backend is automatically chosen for a headless build, but also
- // adding it here allows us to run in a non-headless build too.
- command_line->AppendSwitchASCII(switches::kOzonePlatform, "headless");
-
if (!browser_->options()->gl_implementation.empty()) {
command_line->AppendSwitchASCII(switches::kUseGL,
browser_->options()->gl_implementation);

Powered by Google App Engine
This is Rietveld 408576698