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

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

Issue 1148383002: Add onGetUsbPrinterInfoRequested event to printerProvider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 b261ce27879e1453a46faef2725010512466a542..6f52f234d593b34e24ddd3a133d9404ac0ee2635 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -1008,7 +1008,12 @@ cr.define('print_preview', function() {
* @private
*/
onExtensionPrintersAdded_: function(event) {
- this.insertDestinations_(event.printers.map(function(printer) {
+ // Filter out printers enumerated from providers' "usbPrinters" manifest
+ // key for now.
+ var filteredPrinters = event.printers.filter(function(printer) {
+ return 'extensionId' in printer;
+ });
+ this.insertDestinations_(filteredPrinters.map(function(printer) {
return print_preview.ExtensionDestinationParser.parse(printer);
}));

Powered by Google App Engine
This is Rietveld 408576698