| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 'marginsType': printTicketStore.marginsType.getValue(), | 258 'marginsType': printTicketStore.marginsType.getValue(), |
| 259 'isFirstRequest': requestId == 0, | 259 'isFirstRequest': requestId == 0, |
| 260 'requestID': requestId, | 260 'requestID': requestId, |
| 261 'previewModifiable': documentInfo.isModifiable, | 261 'previewModifiable': documentInfo.isModifiable, |
| 262 'printToPDF': | 262 'printToPDF': |
| 263 destination != null && | 263 destination != null && |
| 264 destination.id == | 264 destination.id == |
| 265 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, | 265 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, |
| 266 'printWithCloudPrint': destination != null && !destination.isLocal, | 266 'printWithCloudPrint': destination != null && !destination.isLocal, |
| 267 'printWithPrivet': destination != null && destination.isPrivet, | 267 'printWithPrivet': destination != null && destination.isPrivet, |
| 268 'printWithExtension': destination != null && destination.isExtension, |
| 268 'deviceName': destination == null ? 'foo' : destination.id, | 269 'deviceName': destination == null ? 'foo' : destination.id, |
| 269 'generateDraftData': documentInfo.isModifiable, | 270 'generateDraftData': documentInfo.isModifiable, |
| 270 'fitToPageEnabled': printTicketStore.fitToPage.getValue(), | 271 'fitToPageEnabled': printTicketStore.fitToPage.getValue(), |
| 271 | 272 |
| 272 // NOTE: Even though the following fields don't directly relate to the | 273 // NOTE: Even though the following fields don't directly relate to the |
| 273 // preview, they still need to be included. | 274 // preview, they still need to be included. |
| 274 'duplex': printTicketStore.duplex.getValue() ? | 275 'duplex': printTicketStore.duplex.getValue() ? |
| 275 NativeLayer.DuplexMode.LONG_EDGE : NativeLayer.DuplexMode.SIMPLEX, | 276 NativeLayer.DuplexMode.LONG_EDGE : NativeLayer.DuplexMode.SIMPLEX, |
| 276 'copies': 1, | 277 'copies': 1, |
| 277 'collate': true, | 278 'collate': true, |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 return this.serializedAppStateStr_; | 1031 return this.serializedAppStateStr_; |
| 1031 } | 1032 } |
| 1032 }; | 1033 }; |
| 1033 | 1034 |
| 1034 // Export | 1035 // Export |
| 1035 return { | 1036 return { |
| 1036 NativeInitialSettings: NativeInitialSettings, | 1037 NativeInitialSettings: NativeInitialSettings, |
| 1037 NativeLayer: NativeLayer | 1038 NativeLayer: NativeLayer |
| 1038 }; | 1039 }; |
| 1039 }); | 1040 }); |
| OLD | NEW |