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

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: Split out print_preview integration into a separate patch. 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
« no previous file with comments | « no previous file | extensions/browser/api/printer_provider/printer_provider_api.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 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) {
Vitaly Buka (NO REVIEWS) 2015/05/21 00:54:43 this piece for another CL?
Reilly Grant (use Gerrit) 2015/05/21 00:59:55 This piece keeps the changes in this CL from havin
+ return 'extensionId' in printer;
+ });
+ this.insertDestinations_(filteredPrinters.map(function(printer) {
return print_preview.ExtensionDestinationParser.parse(printer);
}));
« no previous file with comments | « no previous file | extensions/browser/api/printer_provider/printer_provider_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698