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

Unified Diff: headless/public/headless_browser.cc

Issue 2762593002: Add --headless flag to Windows (Closed)
Patch Set: added TODO Created 3 years, 7 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 | « headless/public/headless_browser.h ('k') | headless/public/headless_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.cc
diff --git a/headless/public/headless_browser.cc b/headless/public/headless_browser.cc
index d68c02d94c7aa66831cab6de386397c4d2a58cb6..9be5aa50a1e906da78f816cc338897efebf17de1 100644
--- a/headless/public/headless_browser.cc
+++ b/headless/public/headless_browser.cc
@@ -9,6 +9,10 @@
#include "content/public/common/user_agent.h"
#include "headless/public/version.h"
+#if defined(OS_WIN)
+#include "sandbox/win/src/sandbox_types.h"
+#endif
+
using Options = headless::HeadlessBrowser::Options;
using Builder = headless::HeadlessBrowser::Options::Builder;
@@ -27,6 +31,10 @@ std::string GetProductNameAndVersion() {
Options::Options(int argc, const char** argv)
: argc(argc),
argv(argv),
+#if defined(OS_WIN)
+ instance(0),
+ sandbox_info(nullptr),
+#endif
devtools_socket_fd(0),
message_pump(nullptr),
single_process_mode(false),
@@ -115,6 +123,18 @@ Builder& Builder::AddMojoServiceName(const std::string& mojo_service_name) {
return *this;
}
+#if defined(OS_WIN)
+Builder& Builder::SetInstance(HINSTANCE instance) {
+ options_.instance = instance;
+ return *this;
+}
+
+Builder& Builder::SetSandboxInfo(sandbox::SandboxInterfaceInfo* sandbox_info) {
+ options_.sandbox_info = sandbox_info;
+ return *this;
+}
+#endif // defined(OS_WIN)
+
Builder& Builder::SetUserDataDir(const base::FilePath& user_data_dir) {
options_.user_data_dir = user_data_dir;
return *this;
« no previous file with comments | « headless/public/headless_browser.h ('k') | headless/public/headless_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698