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

Unified Diff: printing/printed_document.cc

Issue 335473002: Guarded shrink setting with ifdefs to make clear where it is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thu 06/12/2014 0:59:45.49 Created 6 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_page.h » ('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 7c2392d064dc0e0562a5d783cbaf145ca71633c3..77e3953f4d8299577937343f4964594ab2ad2574 100644
--- a/printing/printed_document.cc
+++ b/printing/printed_document.cc
@@ -65,17 +65,18 @@ PrintedDocument::~PrintedDocument() {
void PrintedDocument::SetPage(int page_number,
Metafile* metafile,
+#if defined(OS_WIN)
double shrink,
+#endif // OS_WIN
const gfx::Size& paper_size,
const gfx::Rect& page_rect) {
// 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,
- shrink));
+ new PrintedPage(page_number + 1, metafile, paper_size, page_rect));
+#if defined(OS_WIN)
+ page->set_shrink_factor(shrink);
+#endif // OS_WIN
{
base::AutoLock lock(lock_);
mutable_.pages_[page_number] = page;
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698