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

Unified Diff: printing/units.h

Issue 46623002: Move settings setup for PDF and cloud print into single location in PrintingContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« printing/printing_context_win.cc ('K') | « printing/printing_context_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/units.h
diff --git a/printing/units.h b/printing/units.h
index 8f028324301ab7f02915bd8a54af4258318aae5a..0e6cfd2ca40997cb4ff2b997507371b6c4422135 100644
--- a/printing/units.h
+++ b/printing/units.h
@@ -9,7 +9,7 @@
namespace printing {
-// Length of a thousanth of inches in 0.01mm unit.
+// Length of a thousandth of inches in 0.01mm unit.
const int kHundrethsMMPerInch = 2540;
// Length of an inch in CSS's 1pt unit.
@@ -20,6 +20,25 @@ const int kPointsPerInch = 72;
// http://dev.w3.org/csswg/css3-values/#the-px-unit
const int kPixelsPerInch = 96;
+// Dpi used to save to PDF or Cloud Print.
+const int kDefaultPdfDpi = 300;
+
+// LETTER: 8.5 x 11 inches
+const float kLetterWidthInch = 8.5f;
+const float kLetterHeightInch = 11.0f;
+
+// LEGAL: 8.5 x 14 inches
+const float kLegalWidthInch = 8.5f;
+const float kLegalHeightInch = 14.0f;
+
+// A4: 8.27 x 11.69 inches
+const float kA4WidthInch = 8.27f;
+const float kA4HeightInch = 11.69f;
+
+// A3: 11.69 x 16.54 inches
+const float kA3WidthInch = 11.69f;
+const float kA3HeightInch = 16.54f;
+
// Converts from one unit system to another using integer arithmetics.
PRINTING_EXPORT int ConvertUnit(int value, int old_unit, int new_unit);
« printing/printing_context_win.cc ('K') | « printing/printing_context_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698