Index: chrome/renderer/print_web_view_helper_linux.cc |
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc |
index 0915681dfeef3b45a5f3b6a80981eab6f1be89b3..c07f76ba210099cabad39df1fe18997330c659ea 100644 |
--- a/chrome/renderer/print_web_view_helper_linux.cc |
+++ b/chrome/renderer/print_web_view_helper_linux.cc |
@@ -209,7 +209,13 @@ void PrintWebViewHelper::PrintPageInternal( |
printing::MetafileSkiaWrapper::SetMetafileOnCanvas(canvas.get(), metafile); |
frame->printPage(params.page_number, canvas.get()); |
- // TODO(myhuang): We should render the header and the footer. |
+ if (params.params.display_header_footer) { |
+ // |page_number| is 0-based, so 1 is added. |
+ // The scale factor on Linux is 1. |
+ PrintHeaderAndFooter(device, canvas.get(), params.page_number + 1, |
+ print_preview_context_.total_page_count(), 1, |
+ page_layout_in_points, *header_footer_info_); |
+ } |
// Done printing. Close the device context to retrieve the compiled metafile. |
if (!metafile->FinishPage()) |