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

Unified Diff: chrome/app/chrome_main.cc

Issue 2762593002: Add --headless flag to Windows (Closed)
Patch Set: Fix Mac build Created 3 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
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index 0d7a8ad573e4f220d0fff90b8afe7255dba4b18f..be58196101abebdf6e02a8bd542869c8b9a7a30f 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -106,6 +106,13 @@ int ChromeMain(int argc, const char** argv) {
}
#endif // defined(OS_LINUX) || defined(OS_MACOSX)
+#if defined(OS_WIN)
+ base::CommandLine::Init(0, NULL);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless)) {
+ return headless::HeadlessShellMain(instance, sandbox_info);
+ }
+#endif // defined(OS_WIN)
+
#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
version_info::Channel channel = chrome::GetChannel();
if (channel == version_info::Channel::CANARY ||

Powered by Google App Engine
This is Rietveld 408576698