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

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

Issue 10867004: Notify print preview UI if getting capabilityes failed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 f008d77d31ce9798b8abf0747a9be1f1b3189ef9..bb0c1bedac85a85f05db893a1fb1fa486f284e02 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -19,6 +19,8 @@ cr.define('print_preview', function() {
global['setPrinters'] = this.onSetPrinters_.bind(this);
global['updateWithPrinterCapabilities'] =
this.onUpdateWithPrinterCapabilities_.bind(this);
+ global['failedToGetPrinterCapabilities'] =
+ this.onFailedToGetPrinterCapabilities_.bind(this);
global['reloadPrintersList'] = this.onReloadPrintersList_.bind(this);
global['printToCloud'] = this.onPrintToCloud_.bind(this);
global['fileSelectionCancelled'] =
@@ -408,6 +410,17 @@ cr.define('print_preview', function() {
this.dispatchEvent(capsSetEvent);
},
+ /**
+ * Called when native layer gets settings information for a requested local
+ * destination.
+ * @param {Object} printer_name printer affected by error.
+ * @private
+ */
+ onFailedToGetPrinterCapabilities_: function(printer_name) {
+ // TODO(rltoscano): Switch to the next printer.
+ console.log('onFailedToGetPrinterCapabilities: ' + printer_name);
+ },
+
/** Reloads the printer list. */
onReloadPrintersList_: function() {
cr.dispatchSimpleEvent(this, NativeLayer.EventType.DESTINATIONS_RELOAD);

Powered by Google App Engine
This is Rietveld 408576698