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

Unified Diff: chrome/browser/resources/print_preview/data/destination_store.js

Issue 2760753002: [CUPS] Implement the local CUPS printer setup waiting UI. (Closed)
Patch Set: Address dpapad@'s comments. Fix failed test. Created 3 years, 9 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/print_preview/print_preview.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/data/destination_store.js
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js
index 548a437af10a1f7332fb8a68a99863da557dd89d..34021ccf7b626a6c0589cef0e5782ee93968b848 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -312,8 +312,6 @@ cr.define('print_preview', function() {
'print_preview.DestinationStore.CACHED_SELECTED_DESTINATION_INFO_READY',
SELECTED_DESTINATION_CAPABILITIES_READY:
'print_preview.DestinationStore.SELECTED_DESTINATION_CAPABILITIES_READY',
- PRINTER_CONFIGURED:
- 'print_preview.DestinationStore.PRINTER_CONFIGURED',
};
/**
@@ -1109,28 +1107,11 @@ cr.define('print_preview', function() {
* Attempt to resolve the capabilities for a Chrome OS printer.
* @param {!print_preview.Destination} destination The destination which
* requires resolution.
+ * @return {!Promise<!print_preview.PrinterSetupResponse>}
*/
resolveCrosDestination: function(destination) {
assert(destination.origin == print_preview.Destination.Origin.CROS);
- this.nativeLayer_.setupPrinter(destination.id).then(
- /**
- * Handle the result of a successful PRINTER_SETUP request.
- * @param {!print_preview.PrinterSetupResponse} response.
- */
- function(response) {
- this.dispatchEvent(new CustomEvent(
- DestinationStore.EventType.PRINTER_CONFIGURED, {
- detail: response
- }));
- }.bind(this),
- /**
- * Calling printer setup failed.
- */
- function() {
- this.dispatchEvent(new CustomEvent(
- DestinationStore.EventType.PRINTER_CONFIGURED,
- {detail: {printerId: destination.id, success: false}}));
- }.bind(this));
+ return this.nativeLayer_.setupPrinter(destination.id);
},
/**
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/print_preview/print_preview.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698