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

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

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/browser/headless_browser_main_parts.cc ('k') | headless/lib/browser/headless_screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_devtools_manager_delegate.cc
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.cc b/headless/lib/browser/headless_devtools_manager_delegate.cc
index ee5cfca7f1b511ec0d078eae879d0aebe6018850..4d9c8e5cc096fad3ebe0b9af3fa4adf1107a184c 100644
--- a/headless/lib/browser/headless_devtools_manager_delegate.cc
+++ b/headless/lib/browser/headless_devtools_manager_delegate.cc
@@ -59,8 +59,8 @@ std::unique_ptr<base::Value> HeadlessDevToolsManagerDelegate::CreateTarget(
const base::DictionaryValue* params) {
std::string url;
std::string browser_context_id;
- int width = 800;
- int height = 600;
+ int width = browser_->options()->window_size.width();
+ int height = browser_->options()->window_size.height();
params->GetString("url", &url);
params->GetString("browserContextId", &browser_context_id);
params->GetInteger("width", &width);
« no previous file with comments | « headless/lib/browser/headless_browser_main_parts.cc ('k') | headless/lib/browser/headless_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698