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

Unified Diff: headless/app/headless_shell.cc

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: nit 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
Index: headless/app/headless_shell.cc
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index 975b2147641022b89eb26dded9e86f8bd1db49b8..8669854dbb9922e4b605791fc41cb0c782bfdcd4 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -361,7 +361,10 @@ void HeadlessShell::OnScreenshotCaptured(
void HeadlessShell::PrintToPDF() {
devtools_client_->GetPage()->GetExperimental()->PrintToPDF(
- page::PrintToPDFParams::Builder().Build(),
+ page::PrintToPDFParams::Builder()
+ .SetDisplayHeaderFooter(true)
+ .SetPrintBackgrounds(true)
+ .Build(),
base::Bind(&HeadlessShell::OnPDFCreated, weak_factory_.GetWeakPtr()));
}

Powered by Google App Engine
This is Rietveld 408576698