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

Unified Diff: chrome/app/chrome_main.cc

Issue 2762593002: Add --headless flag to Windows (Closed)
Patch Set: fix headless_shell 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
« no previous file with comments | « chrome/BUILD.gn ('k') | headless/BUILD.gn » ('j') | headless/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index 0d7a8ad573e4f220d0fff90b8afe7255dba4b18f..7481030f4cfa0f3c958ee858c804bb54e7f9b6a6 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -93,18 +93,24 @@ int ChromeMain(int argc, const char** argv) {
#if !defined(OS_WIN)
base::CommandLine::Init(params.argc, params.argv);
+#else
+ base::CommandLine::Init(0, NULL);
sky 2017/03/22 16:05:03 Why do you have to add this? Aren't we already ini
dvallet 2017/03/27 05:59:50 Done. You are right, it's not needed. I've moved t
+#endif
const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
ALLOW_UNUSED_LOCAL(command_line);
-#endif
-#if defined(OS_LINUX) || defined(OS_MACOSX)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
if (command_line->HasSwitch(switches::kHeadless)) {
#if defined(OS_MACOSX)
SetUpBundleOverrides();
#endif
+#if defined(OS_WIN)
+ return headless::HeadlessShellMain(instance, sandbox_info);
+#else
return headless::HeadlessShellMain(argc, argv);
sky 2017/03/22 16:05:03 Can HeadlessShellMain take ContentMainParams so th
Sami 2017/03/22 19:46:25 We could add an override for that, but for users w
dvallet 2017/03/27 05:59:50 Done
+#endif
}
-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
version_info::Channel channel = chrome::GetChannel();
« no previous file with comments | « chrome/BUILD.gn ('k') | headless/BUILD.gn » ('j') | headless/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698