| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Object describing the printable area of a page in the document. | 9 * Object describing the printable area of a page in the document. |
| 10 * @param {!print_preview.Coordinate2d} origin Top left corner of the | 10 * @param {!print_preview.Coordinate2d} origin Top left corner of the |
| 11 * printable area of the document. | 11 * printable area of the document. |
| 12 * @param {!print_preview.Size} size Size of the printable area of the | 12 * @param {!print_preview.Size} size Size of the printable area of the |
| 13 * document. | 13 * document. |
| 14 * @constructor | 14 * @constructor |
| 15 */ | 15 */ |
| 16 function PrintableArea(origin, size) { | 16 function PrintableArea(origin, size) { |
| 17 /** | 17 /** |
| 18 * Top left corner of the printable area of the document. | 18 * Top left corner of the printable area of the document. |
| 19 * @type {!print_preview.Coordinate2d} | 19 * @type {!print_preview.Coordinate2d} |
| 20 * @private | 20 * @private |
| 21 */ | 21 */ |
| 22 this.origin_ = origin; | 22 this.origin_ = origin; |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Size of the printable area of the document. | 25 * Size of the printable area of the document. |
| 26 * @type {!print_preview.Size} | 26 * @type {!print_preview.Size} |
| 27 * @private | 27 * @private |
| 28 */ | 28 */ |
| 29 this.size_ = size; | 29 this.size_ = size; |
| 30 }; | 30 } |
| 31 | 31 |
| 32 PrintableArea.prototype = { | 32 PrintableArea.prototype = { |
| 33 /** | 33 /** |
| 34 * @return {!print_preview.Coordinate2d} Top left corner of the printable | 34 * @return {!print_preview.Coordinate2d} Top left corner of the printable |
| 35 * area of the document. | 35 * area of the document. |
| 36 */ | 36 */ |
| 37 get origin() { | 37 get origin() { |
| 38 return this.origin_; | 38 return this.origin_; |
| 39 }, | 39 }, |
| 40 | 40 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 55 this.origin_.equals(other.origin_) && | 55 this.origin_.equals(other.origin_) && |
| 56 this.size_.equals(other.size_); | 56 this.size_.equals(other.size_); |
| 57 } | 57 } |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // Export | 60 // Export |
| 61 return { | 61 return { |
| 62 PrintableArea: PrintableArea | 62 PrintableArea: PrintableArea |
| 63 }; | 63 }; |
| 64 }); | 64 }); |
| OLD | NEW |