Index: chrome/browser/resources/print_preview/data/local_parsers.js |
diff --git a/chrome/browser/resources/print_preview/data/local_parsers.js b/chrome/browser/resources/print_preview/data/local_parsers.js |
index 91d5208978fc04fb8f51578874175dc42097f380..308e3c5a7a20d77d860652e7e2bbbc30eed0329f 100644 |
--- a/chrome/browser/resources/print_preview/data/local_parsers.js |
+++ b/chrome/browser/resources/print_preview/data/local_parsers.js |
@@ -14,14 +14,22 @@ cr.define('print_preview', function() { |
* destination. |
* @return {!print_preview.Destination} Parsed local print destination. |
*/ |
- LocalDestinationParser.parse = function(destinationInfo) { |
+ LocalDestinationParser.parse = function (destinationInfo) { |
+ // Convert options into cloud print tags format. |
+ var tags = Object.keys(destinationInfo.printerOptions).map(function (key) { |
+ return "__cp__" + key + "=" + this[key] |
Aleksey Shlyapnikov
2014/03/28 20:26:16
I'd use more specific prefix, __cp_local__ or some
|
+ }, destinationInfo.printerOptions); |
return new print_preview.Destination( |
destinationInfo.deviceName, |
print_preview.Destination.Type.LOCAL, |
print_preview.Destination.Origin.LOCAL, |
destinationInfo.printerName, |
false /*isRecent*/, |
- print_preview.Destination.ConnectionStatus.ONLINE); |
+ print_preview.Destination.ConnectionStatus.ONLINE, |
+ { |
+ 'tags': tags, |
+ 'description': destinationInfo.printerDescription |
+ }); |
}; |
/** Namespace that contains a method to parse local print capabilities. */ |
@@ -105,7 +113,7 @@ cr.define('print_preview', function() { |
if (destinationInfo.isUnregistered) { |
returnedPrinters.push(new print_preview.Destination( |
- destinationInfo.serviceName, |
+ destinationInfo.serviceName, |
print_preview.Destination.Type.GOOGLE, |
print_preview.Destination.Origin.PRIVET, |
destinationInfo.name, |