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

Unified Diff: headless/lib/browser/headless_browser_impl.cc

Issue 2624343002: Get headless_shell building on Windows. (Closed)
Patch Set: Get headless_shell building on Windows. Created 3 years, 10 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/lib/browser/headless_browser_impl.cc
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
index e0546b174fa1deaefa8462946423e31578196861..4de712f9a04fd17fb80515566303eb04f61d62bd 100644
--- a/headless/lib/browser/headless_browser_impl.cc
+++ b/headless/lib/browser/headless_browser_impl.cc
@@ -24,6 +24,11 @@
#include "ui/events/devices/device_data_manager.h"
#include "ui/gfx/geometry/size.h"
+#if defined(OS_WIN)
+#include "content/public/app/sandbox_helper_win.h"
+#include "sandbox/win/src/sandbox_types.h"
+#endif
+
namespace headless {
namespace {
@@ -31,8 +36,14 @@ int RunContentMain(
HeadlessBrowser::Options options,
const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback) {
content::ContentMainParams params(nullptr);
+#if defined(OS_WIN)
+ sandbox::SandboxInterfaceInfo sandbox_info = {0};
+ content::InitializeSandboxInfo(&sandbox_info);
+ params.sandbox_info = &sandbox_info;
+#elif !defined(OS_ANDROID)
params.argc = options.argc;
params.argv = options.argv;
+#endif
// TODO(skyostil): Implement custom message pumps.
DCHECK(!options.message_pump);

Powered by Google App Engine
This is Rietveld 408576698