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

Unified Diff: chrome/browser/resources/print_preview/search/destination_list.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
Index: chrome/browser/resources/print_preview/search/destination_list.js
diff --git a/chrome/browser/resources/print_preview/search/destination_list.js b/chrome/browser/resources/print_preview/search/destination_list.js
index 351d31184980cbe76ca4808d869d0e1ec89238c0..89b8163ea99404e26e3834e409707154b1435a90 100644
--- a/chrome/browser/resources/print_preview/search/destination_list.js
+++ b/chrome/browser/resources/print_preview/search/destination_list.js
@@ -225,6 +225,17 @@ cr.define('print_preview', function() {
},
/**
+ * @param {string} destinationId The ID of the destination.
+ * @return {?print_preview.DestinationListItem} The found destination list
+ * item or null if not found.
+ */
+ getDestinationItem: function(destinationId) {
+ return this.listItems_.find(function(listItem) {
+ return listItem.destination.id == destinationId;
+ }) || null;
+ },
+
+ /**
* @param {string} text Text to set the action link to.
* @protected
*/

Powered by Google App Engine
This is Rietveld 408576698