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

Unified Diff: components/printing/renderer/print_web_view_helper.h

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
Index: components/printing/renderer/print_web_view_helper.h
diff --git a/components/printing/renderer/print_web_view_helper.h b/components/printing/renderer/print_web_view_helper.h
index 15d2c288e78a4722d272ce1b784339b82fdad075..c4339d474adba8a96ac7ded22102294404bc2cf5 100644
--- a/components/printing/renderer/print_web_view_helper.h
+++ b/components/printing/renderer/print_web_view_helper.h
@@ -293,10 +293,12 @@ class PrintWebViewHelper
#if defined(OS_MACOSX)
void PrintPagesInternal(const PrintMsg_Print_Params& params,
const std::vector<int>& printed_pages,
+ int page_count,
blink::WebLocalFrame* frame);
#else
void PrintPageInternal(const PrintMsg_Print_Params& params,
int page_number,
+ int page_count,
blink::WebLocalFrame* frame,
PdfMetafileSkia* metafile,
gfx::Size* page_size_in_dpi,
@@ -308,6 +310,7 @@ class PrintWebViewHelper
#if defined(OS_MACOSX)
void RenderPage(const PrintMsg_Print_Params& params,
int page_number,
+ int page_count,
blink::WebLocalFrame* frame,
bool is_preview,
PdfMetafileSkia* metafile,
@@ -346,9 +349,8 @@ class PrintWebViewHelper
const PrintMsg_PrintPages_Params& params,
int page_count);
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
- // Given the |device| and |canvas| to draw on, prints the appropriate headers
- // and footers using strings from |header_footer_info| on to the canvas.
+ // Given the |canvas| to draw on, prints the appropriate headers and footers
+ // to |canvas| using information from the remaining parameters.
static void PrintHeaderAndFooter(blink::WebCanvas* canvas,
int page_number,
int total_pages,
@@ -356,7 +358,6 @@ class PrintWebViewHelper
float webkit_scale_factor,
const PageSizeMargins& page_layout_in_points,
const PrintMsg_Print_Params& params);
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Script Initiated Printing ------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698