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

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

Issue 2606043004: Perform printer setup on Chrome OS before selecting printer. (Closed)
Patch Set: fix nits Created 3 years, 11 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 e0c54bc360b0fe104d2f383b49db9cabe8577fe0..d4b57a1d4dbfeb1e97204624e53008d486feef2a 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -15,6 +15,15 @@ cr.exportPath('print_preview');
*/
print_preview.PreviewSettings;
+/**
+ * @typedef {{
+ * printerId: string,
+ * success: boolean,
+ * capabilities: Object,
+ * }}
+*/
+print_preview.PrinterSetupResponse;
+
cr.define('print_preview', function() {
'use strict';
@@ -232,6 +241,15 @@ cr.define('print_preview', function() {
},
/**
+ * Requests that Chrome peform printer setup for the given printer.
+ * @param {string} printerId
+ * @return {!Promise<!print_preview.PrinterSetupResponse>}
+ */
+ setupPrinter: function(printerId) {
+ return cr.sendWithPromise('setupPrinter', printerId);
+ },
+
+ /**
* @param {!print_preview.Destination} destination Destination to print to.
* @param {!print_preview.ticket_items.Color} color Color ticket item.
* @return {number} Native layer color model.

Powered by Google App Engine
This is Rietveld 408576698