| Index: chrome/browser/resources/print_preview/print_preview_utils.js
|
| diff --git a/chrome/browser/resources/print_preview/print_preview_utils.js b/chrome/browser/resources/print_preview/print_preview_utils.js
|
| index 594769e96d7b23a299e04a1d0ebdd10f9b4f0adf..90ecd1603accb153b7e25bd4c5b976d097cdc0e0 100644
|
| --- a/chrome/browser/resources/print_preview/print_preview_utils.js
|
| +++ b/chrome/browser/resources/print_preview/print_preview_utils.js
|
| @@ -203,3 +203,24 @@ function randomInteger(endPointA, endPointB) {
|
| to = Math.max(endPointA, endPointB);
|
| return Math.floor(Math.random() * (to - from + 1) + from);
|
| }
|
| +
|
| +// Number of points per inch.
|
| +POINTS_PER_INCH = 72;
|
| +
|
| +/**
|
| + * Converts |value| from inches to points.
|
| + * @param {number} value The number in inches.
|
| + * @return {number} |value| in points.
|
| + */
|
| +function convertInchesToPoints(value) {
|
| + return value * POINTS_PER_INCH;
|
| +}
|
| +
|
| +/**
|
| + * Converts |value| from points to inches.
|
| + * @param {number} value The number in points.
|
| + * @return {number} |value| in inches.
|
| + */
|
| +function convertPointsToInches(value) {
|
| + return value / POINTS_PER_INCH;
|
| +}
|
|
|