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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 [JSON.stringify(ticket), | 261 [JSON.stringify(ticket), |
262 requestId > 0 ? documentInfo.pageCount : -1, | 262 requestId > 0 ? documentInfo.pageCount : -1, |
263 documentInfo.isModifiable]); | 263 documentInfo.isModifiable]); |
264 }, | 264 }, |
265 | 265 |
266 /** | 266 /** |
267 * Requests that the document be printed. | 267 * Requests that the document be printed. |
268 * @param {!print_preview.Destination} destination Destination to print to. | 268 * @param {!print_preview.Destination} destination Destination to print to. |
269 * @param {!print_preview.PrintTicketStore} printTicketStore Used to get the | 269 * @param {!print_preview.PrintTicketStore} printTicketStore Used to get the |
270 * state of the print ticket. | 270 * state of the print ticket. |
271 * @param {print_preview.CloudPrintInterface} cloudPrintInterface Interface | 271 * @param {cloudprint.CloudPrintInterface} cloudPrintInterface Interface |
272 * to Google Cloud Print. | 272 * to Google Cloud Print. |
273 * @param {!print_preview.DocumentInfo} documentInfo Document data model. | 273 * @param {!print_preview.DocumentInfo} documentInfo Document data model. |
274 * @param {boolean=} opt_isOpenPdfInPreview Whether to open the PDF in the | 274 * @param {boolean=} opt_isOpenPdfInPreview Whether to open the PDF in the |
275 * system's preview application. | 275 * system's preview application. |
276 * @param {boolean=} opt_showSystemDialog Whether to open system dialog for | 276 * @param {boolean=} opt_showSystemDialog Whether to open system dialog for |
277 * advanced settings. | 277 * advanced settings. |
278 */ | 278 */ |
279 startPrint: function(destination, printTicketStore, cloudPrintInterface, | 279 startPrint: function(destination, printTicketStore, cloudPrintInterface, |
280 documentInfo, opt_isOpenPdfInPreview, | 280 documentInfo, opt_isOpenPdfInPreview, |
281 opt_showSystemDialog) { | 281 opt_showSystemDialog) { |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 /** @return {boolean} Whether the document to print is modifiable. */ | 915 /** @return {boolean} Whether the document to print is modifiable. */ |
916 get isDocumentModifiable() { | 916 get isDocumentModifiable() { |
917 return this.isDocumentModifiable_; | 917 return this.isDocumentModifiable_; |
918 }, | 918 }, |
919 | 919 |
920 /** @return {string} Document title. */ | 920 /** @return {string} Document title. */ |
921 get documentTitle() { | 921 get documentTitle() { |
922 return this.documentTitle_; | 922 return this.documentTitle_; |
923 }, | 923 }, |
924 | 924 |
925 /** @return {bool} Whether the document has selection. */ | 925 /** @return {boolean} Whether the document has selection. */ |
926 get documentHasSelection() { | 926 get documentHasSelection() { |
927 return this.documentHasSelection_; | 927 return this.documentHasSelection_; |
928 }, | 928 }, |
929 | 929 |
930 /** @return {bool} Whether selection only should be printed. */ | 930 /** @return {boolean} Whether selection only should be printed. */ |
931 get selectionOnly() { | 931 get selectionOnly() { |
932 return this.selectionOnly_; | 932 return this.selectionOnly_; |
933 }, | 933 }, |
934 | 934 |
935 /** @return {?string} ID of the system default destination. */ | 935 /** @return {?string} ID of the system default destination. */ |
936 get systemDefaultDestinationId() { | 936 get systemDefaultDestinationId() { |
937 return this.systemDefaultDestinationId_; | 937 return this.systemDefaultDestinationId_; |
938 }, | 938 }, |
939 | 939 |
940 /** @return {?string} Serialized app state. */ | 940 /** @return {?string} Serialized app state. */ |
941 get serializedAppStateStr() { | 941 get serializedAppStateStr() { |
942 return this.serializedAppStateStr_; | 942 return this.serializedAppStateStr_; |
943 } | 943 } |
944 }; | 944 }; |
945 | 945 |
946 // Export | 946 // Export |
947 return { | 947 return { |
948 NativeInitialSettings: NativeInitialSettings, | 948 NativeInitialSettings: NativeInitialSettings, |
949 NativeLayer: NativeLayer | 949 NativeLayer: NativeLayer |
950 }; | 950 }; |
951 }); | 951 }); |
OLD | NEW |