summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/print_preview/native_layer.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/print_preview/native_layer.js')
-rw-r--r--chrome/browser/resources/print_preview/native_layer.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js
index 308c9c2..5da08fc 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -273,12 +273,18 @@ cr.define('print_preview', function() {
* @param {!print_preview.DocumentInfo} documentInfo Document data model.
* @param {boolean=} opt_isOpenPdfInPreview Whether to open the PDF in the
* system's preview application.
+ * @param {boolean=} opt_showSystemDialog Whether to open system dialog for
+ * advanced settings.
*/
startPrint: function(destination, printTicketStore, cloudPrintInterface,
- documentInfo, opt_isOpenPdfInPreview) {
+ documentInfo, opt_isOpenPdfInPreview,
+ opt_showSystemDialog) {
assert(printTicketStore.isTicketValid(),
'Trying to print when ticket is not valid');
+ assert(!opt_showSystemDialog || (cr.isWindows && destination.isLocal),
+ 'Implemented for Windows only');
+
var ticket = {
'pageRange': printTicketStore.pageRange.getDocumentPageRanges(),
'mediaSize': printTicketStore.mediaSize.getValue(),
@@ -304,7 +310,8 @@ cr.define('print_preview', function() {
'requestID': -1,
'fitToPageEnabled': printTicketStore.fitToPage.getValue(),
'pageWidth': documentInfo.pageSize.width,
- 'pageHeight': documentInfo.pageSize.height
+ 'pageHeight': documentInfo.pageSize.height,
+ 'showSystemDialog': opt_showSystemDialog
};
if (!destination.isLocal) {
@@ -347,6 +354,7 @@ cr.define('print_preview', function() {
/** Shows the system's native printing dialog. */
startShowSystemDialog: function() {
+ assert(!cr.isWindows);
chrome.send('showSystemDialog');
},