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

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

Issue 1979903002: Print Preview: Get printer info with capabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cups_14
Patch Set: nit Created 4 years, 7 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 | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('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 ef00b68646241803581709486942ff60d80981fe..acbfae038781a9008a0fa7ad8cd361e356bff7fd 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -1249,6 +1249,8 @@ cr.define('print_preview', function() {
*/
onLocalDestinationCapabilitiesSet_: function(event) {
var destinationId = event.settingsInfo['printerId'];
+ var printerName = event.settingsInfo['printerName'];
+ var printerDescription = event.settingsInfo['printerDescription'];
var key = this.getDestinationKey_(
print_preview.Destination.Origin.LOCAL,
destinationId,
@@ -1272,20 +1274,19 @@ cr.define('print_preview', function() {
}
destination.capabilities = capabilities;
} else {
- // TODO(rltoscano): This makes the assumption that the "deviceName" is
- // the same as "printerName". We should include the "printerName" in
- // the response. See http://crbug.com/132831.
destination = print_preview.LocalDestinationParser.parse(
- {deviceName: destinationId, printerName: destinationId});
+ {deviceName: destinationId,
+ printerName: printerName,
+ printerDescription: printerDescription});
destination.capabilities = capabilities;
this.insertDestination_(destination);
}
}
if (this.selectedDestination_ &&
this.selectedDestination_.id == destinationId) {
- cr.dispatchSimpleEvent(this,
- DestinationStore.EventType.
- SELECTED_DESTINATION_CAPABILITIES_READY);
+ cr.dispatchSimpleEvent(
+ this,
+ DestinationStore.EventType.SELECTED_DESTINATION_CAPABILITIES_READY);
}
},
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698