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
3 // found in the LICENSE file.
5 cr.define('print_preview', function() {
9 * Immutable two-dimensional size.
10 * @param {number} width Width of the size.
11 * @param {number} height Height of the size.
14 function Size(width, height) {
27 this.height_ = height;
31 /** @return {number} Width of the size. */
36 /** @return {number} Height of the size. */
42 * @param {print_preview.Size} other Other size object to compare against.
43 * @return {boolean} Whether this size object is equal to another.
45 equals: function(other) {
46 return other != null &&
47 this.width_ == other.width_ &&
48 this.height_ == other.height_;