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 * Immutable two-dimensional size. | 9 * Immutable two-dimensional size. |
10 * @param {number} width Width of the size. | 10 * @param {number} width Width of the size. |
(...skipping 25 matching lines...) Expand all Loading... |
36 /** @return {number} Height of the size. */ | 36 /** @return {number} Height of the size. */ |
37 get height() { | 37 get height() { |
38 return this.height_; | 38 return this.height_; |
39 }, | 39 }, |
40 | 40 |
41 /** | 41 /** |
42 * @param {print_preview.Size} other Other size object to compare against. | 42 * @param {print_preview.Size} other Other size object to compare against. |
43 * @return {boolean} Whether this size object is equal to another. | 43 * @return {boolean} Whether this size object is equal to another. |
44 */ | 44 */ |
45 equals: function(other) { | 45 equals: function(other) { |
46 return other != null && | 46 return other != null && this.width_ == other.width_ && |
47 this.width_ == other.width_ && | |
48 this.height_ == other.height_; | 47 this.height_ == other.height_; |
49 } | 48 } |
50 }; | 49 }; |
51 | 50 |
52 // Export | 51 // Export |
53 return { | 52 return {Size: Size}; |
54 Size: Size | |
55 }; | |
56 }); | 53 }); |
OLD | NEW |