Index: chrome/renderer/print_web_view_helper_mac.mm |
diff --git a/chrome/renderer/print_web_view_helper_mac.mm b/chrome/renderer/print_web_view_helper_mac.mm |
index 95ccb7e69bf215ae5c209aa90778ffbca79b6649..b6d28cbb5952d45d1089dff949662f5ae2895b6e 100644 |
--- a/chrome/renderer/print_web_view_helper_mac.mm |
+++ b/chrome/renderer/print_web_view_helper_mac.mm |
@@ -148,6 +148,20 @@ void PrintWebViewHelper::RenderPage( |
CGContextRef canvasPtr = cgContext; |
#endif |
frame->printPage(page_number, canvasPtr); |
+#if defined(USE_SKIA) |
+ const PrintMsg_Print_Params& printParams = |
+ print_preview_context_.print_params(); |
+ if (printParams.display_header_footer) { |
+ PageSizeMargins page_layout_in_points; |
+ GetPageSizeAndMarginsInPoints(frame, page_number, printParams, |
+ &page_layout_in_points); |
+ // |page_number| is 0-based, so 1 is added. |
+ PrintHeaderAndFooter(device, canvas.get(), page_number + 1, |
+ print_preview_context_.total_page_count(), |
+ scale_factor, page_layout_in_points, |
+ *header_footer_info_); |
+ } |
+#endif // defined(USE_SKIA) |
} |
// Done printing. Close the device context to retrieve the compiled metafile. |