| 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.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * An interface to the native Chromium printing system layer. | 9 * An interface to the native Chromium printing system layer. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 /** | 392 /** |
| 393 * Called when native layer gets settings information for a requested local | 393 * Called when native layer gets settings information for a requested local |
| 394 * destination. | 394 * destination. |
| 395 * @param {string} printerId printer affected by error. | 395 * @param {string} printerId printer affected by error. |
| 396 * @private | 396 * @private |
| 397 */ | 397 */ |
| 398 onFailedToGetPrinterCapabilities_: function(destinationId) { | 398 onFailedToGetPrinterCapabilities_: function(destinationId) { |
| 399 var getCapsFailEvent = new cr.Event( | 399 var getCapsFailEvent = new cr.Event( |
| 400 NativeLayer.EventType.GET_CAPABILITIES_FAIL); | 400 NativeLayer.EventType.GET_CAPABILITIES_FAIL); |
| 401 getCapsFailEvent.destinationId = destinationId; | 401 getCapsFailEvent.destinationId = destinationId; |
| 402 getCapsFailEvent.destinationOrigin = |
| 403 print_preview.Destination.Origin.LOCAL; |
| 402 this.dispatchEvent(getCapsFailEvent); | 404 this.dispatchEvent(getCapsFailEvent); |
| 403 }, | 405 }, |
| 404 | 406 |
| 405 /** Reloads the printer list. */ | 407 /** Reloads the printer list. */ |
| 406 onReloadPrintersList_: function() { | 408 onReloadPrintersList_: function() { |
| 407 cr.dispatchSimpleEvent(this, NativeLayer.EventType.DESTINATIONS_RELOAD); | 409 cr.dispatchSimpleEvent(this, NativeLayer.EventType.DESTINATIONS_RELOAD); |
| 408 }, | 410 }, |
| 409 | 411 |
| 410 /** | 412 /** |
| 411 * Called from the C++ layer. | 413 * Called from the C++ layer. |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 return this.serializedAppStateStr_; | 734 return this.serializedAppStateStr_; |
| 733 } | 735 } |
| 734 }; | 736 }; |
| 735 | 737 |
| 736 // Export | 738 // Export |
| 737 return { | 739 return { |
| 738 NativeInitialSettings: NativeInitialSettings, | 740 NativeInitialSettings: NativeInitialSettings, |
| 739 NativeLayer: NativeLayer | 741 NativeLayer: NativeLayer |
| 740 }; | 742 }; |
| 741 }); | 743 }); |
| OLD | NEW |