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

Unified Diff: printing/printed_document.cc

Issue 2859040: Implement limited paged media support for win. (Closed)
Patch Set: the comment fix Created 10 years, 6 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
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_document_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_document_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698