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

Unified Diff: printing/printed_page.h

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.cc ('k') | printing/printed_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printed_page.h
diff --git a/printing/printed_page.h b/printing/printed_page.h
index 40e96e041d3144b5ecb14d468385bfa2dfa335e3..a1adfa4b416596e850b1c998b9ba7510c1b3286b 100644
--- a/printing/printed_page.h
+++ b/printing/printed_page.h
@@ -25,15 +25,19 @@ class PRINTING_EXPORT PrintedPage
PrintedPage(int page_number,
Metafile* metafile,
const gfx::Size& page_size,
- const gfx::Rect& page_content_rect,
- double shrink_factor);
+ const gfx::Rect& page_content_rect);
// Getters
int page_number() const { return page_number_; }
const Metafile* metafile() const;
const gfx::Size& page_size() const { return page_size_; }
const gfx::Rect& page_content_rect() const { return page_content_rect_; }
+#if defined(OS_WIN)
+ void set_shrink_factor(double shrink_factor) {
+ shrink_factor_ = shrink_factor;
+ }
double shrink_factor() const { return shrink_factor_; }
+#endif // OS_WIN
// Get page content rect adjusted based on
// http://dev.w3.org/csswg/css3-page/#positioning-page-box
@@ -51,6 +55,11 @@ class PRINTING_EXPORT PrintedPage
// Actual paint data.
const scoped_ptr<Metafile> metafile_;
+#if defined(OS_WIN)
+ // Shrink done in comparison to desired_dpi.
+ double shrink_factor_;
+#endif // OS_WIN
+
// The physical page size. To support multiple page formats inside on print
// job.
const gfx::Size page_size_;
@@ -58,9 +67,6 @@ class PRINTING_EXPORT PrintedPage
// The printable area of the page.
const gfx::Rect page_content_rect_;
- // Shrink done in comparison to desired_dpi.
- double shrink_factor_;
-
DISALLOW_COPY_AND_ASSIGN(PrintedPage);
};
« no previous file with comments | « printing/printed_document.cc ('k') | printing/printed_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698