| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 'shouldPrintBackgrounds': printTicketStore.cssBackground.getValue(), | 273 'shouldPrintBackgrounds': printTicketStore.cssBackground.getValue(), |
| 274 'shouldPrintSelectionOnly': printTicketStore.selectionOnly.getValue(), | 274 'shouldPrintSelectionOnly': printTicketStore.selectionOnly.getValue(), |
| 275 'previewModifiable': documentInfo.isModifiable, | 275 'previewModifiable': documentInfo.isModifiable, |
| 276 'printToPDF': destination.id == | 276 'printToPDF': destination.id == |
| 277 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, | 277 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, |
| 278 'printWithCloudPrint': !destination.isLocal, | 278 'printWithCloudPrint': !destination.isLocal, |
| 279 'printWithPrivet': destination.isPrivet, | 279 'printWithPrivet': destination.isPrivet, |
| 280 'deviceName': destination.id, | 280 'deviceName': destination.id, |
| 281 'isFirstRequest': false, | 281 'isFirstRequest': false, |
| 282 'requestID': -1, | 282 'requestID': -1, |
| 283 'fitToPageEnabled': printTicketStore.fitToPage.getValue() | 283 'fitToPageEnabled': printTicketStore.fitToPage.getValue(), |
| 284 'pageWidth': documentInfo.pageSize.width, |
| 285 'pageHeight': documentInfo.pageSize.height, |
| 284 }; | 286 }; |
| 285 | 287 |
| 286 if (!destination.isLocal) { | 288 if (!destination.isLocal) { |
| 287 // We can't set cloudPrintID if the destination is "Print with Cloud | 289 // We can't set cloudPrintID if the destination is "Print with Cloud |
| 288 // Print" because the native system will try to print to Google Cloud | 290 // Print" because the native system will try to print to Google Cloud |
| 289 // Print with this ID instead of opening a Google Cloud Print dialog. | 291 // Print with this ID instead of opening a Google Cloud Print dialog. |
| 290 ticket['cloudPrintID'] = destination.id; | 292 ticket['cloudPrintID'] = destination.id; |
| 291 } | 293 } |
| 292 | 294 |
| 293 if (printTicketStore.marginsType.isCapabilityAvailable() && | 295 if (printTicketStore.marginsType.isCapabilityAvailable() && |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 return this.serializedAppStateStr_; | 870 return this.serializedAppStateStr_; |
| 869 } | 871 } |
| 870 }; | 872 }; |
| 871 | 873 |
| 872 // Export | 874 // Export |
| 873 return { | 875 return { |
| 874 NativeInitialSettings: NativeInitialSettings, | 876 NativeInitialSettings: NativeInitialSettings, |
| 875 NativeLayer: NativeLayer | 877 NativeLayer: NativeLayer |
| 876 }; | 878 }; |
| 877 }); | 879 }); |
| OLD | NEW |