Index: headless/public/headless_browser.h |
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h |
index 4b18f565b9e8fc2f2b8cb91ad0bb885a26a8a64e..b6fdc3e272e6057186e1c11350d3d3c83bfe8c8e 100644 |
--- a/headless/public/headless_browser.h |
+++ b/headless/public/headless_browser.h |
@@ -22,6 +22,10 @@ |
#include "net/base/ip_endpoint.h" |
#include "ui/gfx/geometry/size.h" |
+#if defined(OS_WIN) |
+#include "sandbox/win/src/sandbox_types.h" |
+#endif |
+ |
namespace base { |
class MessagePump; |
class SingleThreadTaskRunner; |
@@ -164,6 +168,14 @@ struct HeadlessBrowser::Options { |
bool enable_crash_reporter; |
base::FilePath crash_dumps_dir; |
+#if defined(OS_WIN) |
+ // Set hardware instance if available, otherwise it defaults to 0. |
+ HINSTANCE instance; |
+ |
+ // Set with sandboc information. This has to be already initialized. |
+ sandbox::SandboxInterfaceInfo* sandbox_info; |
+#endif |
+ |
// Reminder: when adding a new field here, do not forget to add it to |
// HeadlessBrowserContextOptions (where appropriate). |
private: |
@@ -186,6 +198,10 @@ class HeadlessBrowser::Options::Builder { |
Builder& SetDisableSandbox(bool disable_sandbox); |
Builder& SetGLImplementation(const std::string& gl_implementation); |
Builder& AddMojoServiceName(const std::string& mojo_service_name); |
+#if defined(OS_WIN) |
+ Builder& SetInstance(HINSTANCE instance); |
+ Builder& SetSandboxInfo(sandbox::SandboxInterfaceInfo* sandbox_info); |
+#endif |
// Per-context settings. |
@@ -229,7 +245,9 @@ class HeadlessBrowser::Options::Builder { |
// |
// [1] |
// https://chromium.googlesource.com/chromium/src/+/master/docs/linux_zygote.md |
+#if !defined(OS_WIN) |
void RunChildProcessIfNeeded(int argc, const char** argv); |
+#endif |
// Main entry point for running the headless browser. This function constructs |
// the headless browser instance, passing it to the given |