| 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 * @typedef {{selectSaveAsPdfDestination: boolean, | 8 * @typedef {{selectSaveAsPdfDestination: boolean, |
| 9 * layoutSettings.portrait: boolean, | 9 * layoutSettings.portrait: boolean, |
| 10 * pageRange: string, | 10 * pageRange: string, |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 var previewGenDoneEvent = new Event( | 698 var previewGenDoneEvent = new Event( |
| 699 NativeLayer.EventType.PREVIEW_GENERATION_DONE); | 699 NativeLayer.EventType.PREVIEW_GENERATION_DONE); |
| 700 previewGenDoneEvent.previewUid = previewUid; | 700 previewGenDoneEvent.previewUid = previewUid; |
| 701 previewGenDoneEvent.previewResponseId = previewResponseId; | 701 previewGenDoneEvent.previewResponseId = previewResponseId; |
| 702 this.dispatchEvent(previewGenDoneEvent); | 702 this.dispatchEvent(previewGenDoneEvent); |
| 703 }, | 703 }, |
| 704 | 704 |
| 705 /** | 705 /** |
| 706 * Updates print preset options from source PDF document. | 706 * Updates print preset options from source PDF document. |
| 707 * Called from PrintPreviewUI::OnSetOptionsFromDocument(). | 707 * Called from PrintPreviewUI::OnSetOptionsFromDocument(). |
| 708 * @param {{disableScaling: boolean, copies: number}} options Specifies | 708 * @param {{disableScaling: boolean, copies: number, |
| 709 * duplex: number}} options Specifies |
| 709 * printing options according to source document presets. | 710 * printing options according to source document presets. |
| 710 * @private | 711 * @private |
| 711 */ | 712 */ |
| 712 onPrintPresetOptionsFromDocument_: function(options) { | 713 onPrintPresetOptionsFromDocument_: function(options) { |
| 713 var printPresetOptionsEvent = new Event( | 714 var printPresetOptionsEvent = new Event( |
| 714 NativeLayer.EventType.PRINT_PRESET_OPTIONS); | 715 NativeLayer.EventType.PRINT_PRESET_OPTIONS); |
| 715 printPresetOptionsEvent.optionsFromDocument = options; | 716 printPresetOptionsEvent.optionsFromDocument = options; |
| 716 this.dispatchEvent(printPresetOptionsEvent); | 717 this.dispatchEvent(printPresetOptionsEvent); |
| 717 }, | 718 }, |
| 718 | 719 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 return this.serializedAppStateStr_; | 1032 return this.serializedAppStateStr_; |
| 1032 } | 1033 } |
| 1033 }; | 1034 }; |
| 1034 | 1035 |
| 1035 // Export | 1036 // Export |
| 1036 return { | 1037 return { |
| 1037 NativeInitialSettings: NativeInitialSettings, | 1038 NativeInitialSettings: NativeInitialSettings, |
| 1038 NativeLayer: NativeLayer | 1039 NativeLayer: NativeLayer |
| 1039 }; | 1040 }; |
| 1040 }); | 1041 }); |
| OLD | NEW |