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

Unified Diff: headless/public/headless_browser.h

Issue 2199773002: headless: make initial screen/window sizes configurable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix constexpr, reference to screen_size in test. Created 4 years, 4 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/lib/headless_browser_browsertest.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.h
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index 0393f7c1125f04ccc66bf66fbbec69d296becdce..9fcd62c6a0141bebb16e23d665501f3e36c9fc91 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -18,16 +18,13 @@
#include "headless/public/headless_web_contents.h"
#include "net/base/host_port_pair.h"
#include "net/base/ip_endpoint.h"
+#include "ui/gfx/geometry/size.h"
namespace base {
class MessagePump;
class SingleThreadTaskRunner;
}
-namespace gfx {
-class Size;
-}
-
namespace headless {
// This class represents the global headless browser instance. To get a pointer
@@ -126,6 +123,10 @@ struct HeadlessBrowser::Options {
// string can be used to disable GL rendering (e.g., WebGL support).
std::string gl_implementation;
+ // Default window size. This is also used to create the window tree host and
+ // as initial screen size. Defaults to 800x600.
+ gfx::Size window_size;
+
private:
Options(int argc, const char** argv);
@@ -147,6 +148,7 @@ class HeadlessBrowser::Options::Builder {
Builder& SetDisableSandbox(bool disable_sandbox);
Builder& SetProtocolHandlers(ProtocolHandlerMap protocol_handlers);
Builder& SetGLImplementation(const std::string& gl_implementation);
+ Builder& SetWindowSize(const gfx::Size& window_size);
Options Build();
« no previous file with comments | « headless/lib/headless_browser_browsertest.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698