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

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

Issue 909143004: Add support for starting an extension print job to print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: vitaly's feedback Created 5 years, 10 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 d61da749dd9ed820019ba61474f7042017f6cbc4..63477e1a5b56bec8cd3c306673f23ea54ac80c1d 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -327,10 +327,6 @@ cr.define('print_preview', function() {
assert(!opt_showSystemDialog || (cr.isWindows && destination.isLocal),
'Implemented for Windows only');
- // TODO(tbarzic): Implement this.
- assert(!destination.isExtension,
- 'Printing to extension printers not yet implemented.');
-
var ticket = {
'pageRange': printTicketStore.pageRange.getDocumentPageRanges(),
'mediaSize': printTicketStore.mediaSize.getValue(),
@@ -351,6 +347,7 @@ cr.define('print_preview', function() {
print_preview.Destination.GooglePromotedId.SAVE_AS_PDF,
'printWithCloudPrint': !destination.isLocal,
'printWithPrivet': destination.isPrivet,
+ 'printWithExtension': destination.isExtension,
Aleksey Shlyapnikov 2015/02/12 02:23:17 It feels like printWith... are mutually exclusive
tbarzic 2015/02/12 02:42:22 Yep, I agree.
'deviceName': destination.id,
'isFirstRequest': false,
'requestID': -1,
@@ -381,7 +378,7 @@ cr.define('print_preview', function() {
};
}
- if (destination.isPrivet) {
+ if (destination.isPrivet || destination.isExtension) {
ticket['ticket'] = printTicketStore.createPrintTicket(destination);
ticket['capabilities'] = JSON.stringify(destination.capabilities);
}

Powered by Google App Engine
This is Rietveld 408576698