| Index: printing/printed_document.cc
|
| diff --git a/printing/printed_document.cc b/printing/printed_document.cc
|
| index 333f1d877ce14c8818ab688d2213c40644129667..ec040d415d7dc229357cfea0ee8cddf75f6d81f5 100644
|
| --- a/printing/printed_document.cc
|
| +++ b/printing/printed_document.cc
|
| @@ -72,14 +72,16 @@ void PrintedDocument::SetPage(int page_number,
|
| NativeMetafile* metafile,
|
| double shrink,
|
| const gfx::Size& paper_size,
|
| - const gfx::Rect& page_rect) {
|
| + const gfx::Rect& page_rect,
|
| + bool has_visible_overlays) {
|
| // Notice the page_number + 1, the reason is that this is the value that will
|
| // be shown. Users dislike 0-based counting.
|
| scoped_refptr<PrintedPage> page(
|
| new PrintedPage(page_number + 1,
|
| metafile,
|
| paper_size,
|
| - page_rect));
|
| + page_rect,
|
| + has_visible_overlays));
|
| {
|
| AutoLock lock(lock_);
|
| mutable_.pages_[page_number] = page;
|
| @@ -184,7 +186,7 @@ void PrintedDocument::PrintHeaderFooter(gfx::NativeDrawingContext context,
|
| PageOverlays::VerticalPosition y,
|
| const gfx::Font& font) const {
|
| const PrintSettings& settings = immutable_.settings_;
|
| - if (!settings.use_overlays) {
|
| + if (!settings.use_overlays || !page.has_visible_overlays()) {
|
| return;
|
| }
|
| const std::wstring& line = settings.overlays.GetOverlay(x, y);
|
|
|