| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 /** | 222 /** |
| 223 * Enumeration of the origin types for cloud destinations. | 223 * Enumeration of the origin types for cloud destinations. |
| 224 * @enum {string} | 224 * @enum {string} |
| 225 */ | 225 */ |
| 226 Destination.Origin = { | 226 Destination.Origin = { |
| 227 LOCAL: 'local', | 227 LOCAL: 'local', |
| 228 COOKIES: 'cookies', | 228 COOKIES: 'cookies', |
| 229 PROFILE: 'profile', | 229 PROFILE: 'profile', |
| 230 DEVICE: 'device', | 230 DEVICE: 'device', |
| 231 PRIVET: 'privet', | 231 PRIVET: 'privet', |
| 232 EXTENSION: 'extension' | 232 EXTENSION: 'extension', |
| 233 CROS: 'chrome_os', |
| 233 }; | 234 }; |
| 234 | 235 |
| 235 /** | 236 /** |
| 236 * Enumeration of the connection statuses of printer destinations. | 237 * Enumeration of the connection statuses of printer destinations. |
| 237 * @enum {string} | 238 * @enum {string} |
| 238 */ | 239 */ |
| 239 Destination.ConnectionStatus = { | 240 Destination.ConnectionStatus = { |
| 240 DORMANT: 'DORMANT', | 241 DORMANT: 'DORMANT', |
| 241 OFFLINE: 'OFFLINE', | 242 OFFLINE: 'OFFLINE', |
| 242 ONLINE: 'ONLINE', | 243 ONLINE: 'ONLINE', |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 * @return {string} Account this destination is registered for, if known. | 324 * @return {string} Account this destination is registered for, if known. |
| 324 */ | 325 */ |
| 325 get account() { | 326 get account() { |
| 326 return this.account_; | 327 return this.account_; |
| 327 }, | 328 }, |
| 328 | 329 |
| 329 /** @return {boolean} Whether the destination is local or cloud-based. */ | 330 /** @return {boolean} Whether the destination is local or cloud-based. */ |
| 330 get isLocal() { | 331 get isLocal() { |
| 331 return this.origin_ == Destination.Origin.LOCAL || | 332 return this.origin_ == Destination.Origin.LOCAL || |
| 332 this.origin_ == Destination.Origin.EXTENSION || | 333 this.origin_ == Destination.Origin.EXTENSION || |
| 334 this.origin_ == Destination.Origin.CROS || |
| 333 (this.origin_ == Destination.Origin.PRIVET && | 335 (this.origin_ == Destination.Origin.PRIVET && |
| 334 this.connectionStatus_ != | 336 this.connectionStatus_ != |
| 335 Destination.ConnectionStatus.UNREGISTERED); | 337 Destination.ConnectionStatus.UNREGISTERED); |
| 336 }, | 338 }, |
| 337 | 339 |
| 338 /** @return {boolean} Whether the destination is a Privet local printer */ | 340 /** @return {boolean} Whether the destination is a Privet local printer */ |
| 339 get isPrivet() { | 341 get isPrivet() { |
| 340 return this.origin_ == Destination.Origin.PRIVET; | 342 return this.origin_ == Destination.Origin.PRIVET; |
| 341 }, | 343 }, |
| 342 | 344 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 get isProvisional() { | 559 get isProvisional() { |
| 558 return this.provisionalType_ != Destination.ProvisionalType.NONE; | 560 return this.provisionalType_ != Destination.ProvisionalType.NONE; |
| 559 } | 561 } |
| 560 }; | 562 }; |
| 561 | 563 |
| 562 // Export | 564 // Export |
| 563 return { | 565 return { |
| 564 Destination: Destination, | 566 Destination: Destination, |
| 565 }; | 567 }; |
| 566 }); | 568 }); |
| OLD | NEW |