| 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.exportPath('print_preview'); | 5 cr.exportPath('print_preview'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The CDD (Cloud Device Description) describes the capabilities of a print | 8 * The CDD (Cloud Device Description) describes the capabilities of a print |
| 9 * destination. | 9 * destination. |
| 10 * | 10 * |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 * Print destination data object that holds data for both local and cloud | 41 * Print destination data object that holds data for both local and cloud |
| 42 * destinations. | 42 * destinations. |
| 43 * @param {string} id ID of the destination. | 43 * @param {string} id ID of the destination. |
| 44 * @param {!print_preview.Destination.Type} type Type of the destination. | 44 * @param {!print_preview.Destination.Type} type Type of the destination. |
| 45 * @param {!print_preview.Destination.Origin} origin Origin of the | 45 * @param {!print_preview.Destination.Origin} origin Origin of the |
| 46 * destination. | 46 * destination. |
| 47 * @param {string} displayName Display name of the destination. | 47 * @param {string} displayName Display name of the destination. |
| 48 * @param {boolean} isRecent Whether the destination has been used recently. | 48 * @param {boolean} isRecent Whether the destination has been used recently. |
| 49 * @param {!print_preview.Destination.ConnectionStatus} connectionStatus | 49 * @param {!print_preview.Destination.ConnectionStatus} connectionStatus |
| 50 * Connection status of the print destination. | 50 * Connection status of the print destination. |
| 51 * @param {{tags: Array.<string>, | 51 * @param {{tags: (Array.<string>|undefined), |
| 52 * isOwned: ?boolean, | 52 * isOwned: (boolean|undefined), |
| 53 * account: ?string, | 53 * account: (string|undefined), |
| 54 * lastAccessTime: ?number, | 54 * lastAccessTime: (number|undefined), |
| 55 * isTosAccepted: ?boolean, | 55 * isTosAccepted: (boolean|undefined), |
| 56 * cloudID: ?string, | 56 * cloudID: (string|undefined), |
| 57 * description: ?string}=} opt_params Optional parameters for the | 57 * description: (string|undefined)}=} opt_params Optional parameters |
| 58 * destination. | 58 * for the destination. |
| 59 * @constructor | 59 * @constructor |
| 60 */ | 60 */ |
| 61 function Destination(id, type, origin, displayName, isRecent, | 61 function Destination(id, type, origin, displayName, isRecent, |
| 62 connectionStatus, opt_params) { | 62 connectionStatus, opt_params) { |
| 63 /** | 63 /** |
| 64 * ID of the destination. | 64 * ID of the destination. |
| 65 * @private {string} | 65 * @private {string} |
| 66 */ | 66 */ |
| 67 this.id_ = id; | 67 this.id_ = id; |
| 68 | 68 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 91 this.isRecent_ = isRecent; | 91 this.isRecent_ = isRecent; |
| 92 | 92 |
| 93 /** | 93 /** |
| 94 * Tags associated with the destination. | 94 * Tags associated with the destination. |
| 95 * @private {!Array.<string>} | 95 * @private {!Array.<string>} |
| 96 */ | 96 */ |
| 97 this.tags_ = (opt_params && opt_params.tags) || []; | 97 this.tags_ = (opt_params && opt_params.tags) || []; |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * Print capabilities of the destination. | 100 * Print capabilities of the destination. |
| 101 * @private {print_preview.Cdd} | 101 * @private {?print_preview.Cdd} |
| 102 */ | 102 */ |
| 103 this.capabilities_ = null; | 103 this.capabilities_ = null; |
| 104 | 104 |
| 105 /** | 105 /** |
| 106 * Whether the destination is owned by the user. | 106 * Whether the destination is owned by the user. |
| 107 * @private {boolean} | 107 * @private {boolean} |
| 108 */ | 108 */ |
| 109 this.isOwned_ = (opt_params && opt_params.isOwned) || false; | 109 this.isOwned_ = (opt_params && opt_params.isOwned) || false; |
| 110 | 110 |
| 111 /** | 111 /** |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 /** @return {!Array.<string>} Tags associated with the destination. */ | 332 /** @return {!Array.<string>} Tags associated with the destination. */ |
| 333 get tags() { | 333 get tags() { |
| 334 return this.tags_.slice(0); | 334 return this.tags_.slice(0); |
| 335 }, | 335 }, |
| 336 | 336 |
| 337 /** @return {string} Cloud ID associated with the destination */ | 337 /** @return {string} Cloud ID associated with the destination */ |
| 338 get cloudID() { | 338 get cloudID() { |
| 339 return this.cloudID_; | 339 return this.cloudID_; |
| 340 }, | 340 }, |
| 341 | 341 |
| 342 /** @return {print_preview.Cdd} Print capabilities of the destination. */ | 342 /** @return {?print_preview.Cdd} Print capabilities of the destination. */ |
| 343 get capabilities() { | 343 get capabilities() { |
| 344 return this.capabilities_; | 344 return this.capabilities_; |
| 345 }, | 345 }, |
| 346 | 346 |
| 347 /** | 347 /** |
| 348 * @param {!print_preview.Cdd} capabilities Print capabilities of the | 348 * @param {!print_preview.Cdd} capabilities Print capabilities of the |
| 349 * destination. | 349 * destination. |
| 350 */ | 350 */ |
| 351 set capabilities(capabilities) { | 351 set capabilities(capabilities) { |
| 352 this.capabilities_ = capabilities; | 352 this.capabilities_ = capabilities; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 return property.match(query); | 461 return property.match(query); |
| 462 }); | 462 }); |
| 463 } | 463 } |
| 464 }; | 464 }; |
| 465 | 465 |
| 466 // Export | 466 // Export |
| 467 return { | 467 return { |
| 468 Destination: Destination, | 468 Destination: Destination, |
| 469 }; | 469 }; |
| 470 }); | 470 }); |
| OLD | NEW |