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

Unified Diff: headless/app/headless_example.cc

Issue 2835603002: Revert of Add --headless flag to Windows (Closed)
Patch Set: Created 3 years, 8 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/DEPS ('k') | headless/app/headless_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/app/headless_example.cc
diff --git a/headless/app/headless_example.cc b/headless/app/headless_example.cc
index d344796bdde0553dcc50467466b5ce9bc3ad11df..56932ef45ba937630c5ff3ef41986bf4f855def6 100644
--- a/headless/app/headless_example.cc
+++ b/headless/app/headless_example.cc
@@ -11,7 +11,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/memory/weak_ptr.h"
-#include "build/build_config.h"
#include "headless/public/devtools/domains/page.h"
#include "headless/public/devtools/domains/runtime.h"
#include "headless/public/headless_browser.h"
@@ -19,11 +18,6 @@
#include "headless/public/headless_devtools_target.h"
#include "headless/public/headless_web_contents.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
// This class contains the main application logic, i.e., waiting for a page to
// load and printing its DOM. Note that browser initialization happens outside
@@ -164,24 +158,15 @@
}
int main(int argc, const char** argv) {
-#if !defined(OS_WIN)
// This function must be the first thing we call to make sure child processes
// such as the renderer are started properly. The headless library starts
// child processes by forking and exec'ing the main application.
headless::RunChildProcessIfNeeded(argc, argv);
-#endif
// Create a headless browser instance. There can be one of these per process
// and it can only be initialized once.
headless::HeadlessBrowser::Options::Builder builder(argc, argv);
-#if defined(OS_WIN)
- // In windows, you must initialize and set the sandbox, or pass it along
- // if it has already been initialized.
- sandbox::SandboxInterfaceInfo sandbox_info = {0};
- content::InitializeSandboxInfo(&sandbox_info);
- builder.SetSandboxInfo(&sandbox_info);
-#endif
// Here you can customize browser options. As an example we set the window
// size.
builder.SetWindowSize(gfx::Size(800, 600));
« no previous file with comments | « headless/DEPS ('k') | headless/app/headless_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698