OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 cr.define('print_preview', function() { |
| 6 'use strict'; |
| 7 |
| 8 /** |
| 9 * Mutable reference to a capabilities object. |
| 10 * @param {!print_preview.ChromiumCapabilities} Initial instance of the |
| 11 * reference. |
| 12 * @constructor |
| 13 */ |
| 14 function CapabilitiesHolder(capabilities) { |
| 15 /** |
| 16 * Reference to the capabilities object. |
| 17 * @type {!print_preview.ChromiumCapabilities} |
| 18 * @private |
| 19 */ |
| 20 this.capabilities_ = capabilities; |
| 21 }; |
| 22 |
| 23 CapabilitiesHolder.prototype = { |
| 24 /** |
| 25 * @return {!print_preview.ChromiumCapabilities} The instance held by the |
| 26 * holder. |
| 27 */ |
| 28 get: function() { |
| 29 return this.capabilities_; |
| 30 }, |
| 31 |
| 32 /** |
| 33 * @param {!print_preview.ChromiumCapabilities} New instance to put into the |
| 34 * holder. |
| 35 */ |
| 36 set: function(capabilities) { |
| 37 this.capabilities_ = capabilities; |
| 38 } |
| 39 }; |
| 40 |
| 41 // Export |
| 42 return { |
| 43 CapabilitiesHolder: CapabilitiesHolder |
| 44 }; |
| 45 }); |
OLD | NEW |