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

Unified Diff: headless/app/headless_shell.cc

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: adjust command interface and add unit tests 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 18d986eaee8842ad8204a22f175557522f220b40..1608e0d972ce659e50120bcf34f6c97504a432f2 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -360,7 +360,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