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

Unified Diff: headless/app/headless_shell.cc

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: add skia as public_deps instead Created 3 years, 7 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
« headless/BUILD.gn ('K') | « headless/BUILD.gn ('k') | headless/lib/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/app/headless_shell.cc
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index 975b2147641022b89eb26dded9e86f8bd1db49b8..5e62e8a8381fd4aca584b259e098c95fa1806b3f 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)
+ .SetPrintBackground(true)
+ .Build(),
base::Bind(&HeadlessShell::OnPDFCreated, weak_factory_.GetWeakPtr()));
}
« headless/BUILD.gn ('K') | « headless/BUILD.gn ('k') | headless/lib/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698