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

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 skau@'s comment. Rebase 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..903831d9fca0782d1f69e3828eabc45ed51c0053 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;
+ });
dpapad 2017/03/30 20:56:23 find() returns undefined, if nothing is found, see
xdai1 2017/03/30 23:18:43 Thanks. Done.
+ },
+
+ /**
* @param {string} text Text to set the action link to.
* @protected
*/

Powered by Google App Engine
This is Rietveld 408576698