Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4775)

Unified Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 480303002: Use document from preview for System Dialog printing on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue Aug 26 01:11:31 PDT 2014 Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/native_layer.js
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js
index 308c9c2e8712e6f3277305885e90c79681bbc430..5da08fce2ab3f8d746651e04580e86e543e623ca 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');
},
« no previous file with comments | « chrome/browser/printing/printing_message_filter.cc ('k') | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698