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

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

Issue 2624343002: Get headless_shell building on Windows. (Closed)
Patch Set: Remove headless_shell addition to chrome windows build 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 71b79a09190c081eb6a1b3fdd67ff49206ae8760..37a9c928ba25d33869d18a89cb9203c3e123cbd3 100644
--- a/headless/lib/browser/headless_browser_impl.cc
+++ b/headless/lib/browser/headless_browser_impl.cc
@@ -25,6 +25,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 {
@@ -32,8 +37,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