Chromium Code Reviews| 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} |
|
Aleksey Shlyapnikov
2014/09/22 22:00:40
Same here, it's an object, right?
Vitaly Pavlenko
2014/09/22 22:33:11
Same answer.
| |
| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 /** @return {!Array.<string>} Tags associated with the destination. */ | 287 /** @return {!Array.<string>} Tags associated with the destination. */ |
| 288 get tags() { | 288 get tags() { |
| 289 return this.tags_.slice(0); | 289 return this.tags_.slice(0); |
| 290 }, | 290 }, |
| 291 | 291 |
| 292 /** @return {string} Cloud ID associated with the destination */ | 292 /** @return {string} Cloud ID associated with the destination */ |
| 293 get cloudID() { | 293 get cloudID() { |
| 294 return this.cloudID_; | 294 return this.cloudID_; |
| 295 }, | 295 }, |
| 296 | 296 |
| 297 /** @return {print_preview.Cdd} Print capabilities of the destination. */ | 297 /** @return {?print_preview.Cdd} Print capabilities of the destination. */ |
| 298 get capabilities() { | 298 get capabilities() { |
| 299 return this.capabilities_; | 299 return this.capabilities_; |
| 300 }, | 300 }, |
| 301 | 301 |
| 302 /** | 302 /** |
| 303 * @param {!print_preview.Cdd} capabilities Print capabilities of the | 303 * @param {!print_preview.Cdd} capabilities Print capabilities of the |
| 304 * destination. | 304 * destination. |
| 305 */ | 305 */ |
| 306 set capabilities(capabilities) { | 306 set capabilities(capabilities) { |
| 307 this.capabilities_ = capabilities; | 307 this.capabilities_ = capabilities; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 * Enumeration of the connection statuses of printer destinations. | 461 * Enumeration of the connection statuses of printer destinations. |
| 462 * @enum {string} | 462 * @enum {string} |
| 463 */ | 463 */ |
| 464 print_preview.Destination.ConnectionStatus = { | 464 print_preview.Destination.ConnectionStatus = { |
| 465 DORMANT: 'DORMANT', | 465 DORMANT: 'DORMANT', |
| 466 OFFLINE: 'OFFLINE', | 466 OFFLINE: 'OFFLINE', |
| 467 ONLINE: 'ONLINE', | 467 ONLINE: 'ONLINE', |
| 468 UNKNOWN: 'UNKNOWN', | 468 UNKNOWN: 'UNKNOWN', |
| 469 UNREGISTERED: 'UNREGISTERED' | 469 UNREGISTERED: 'UNREGISTERED' |
| 470 }; | 470 }; |
| OLD | NEW |