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

Unified Diff: chrome/browser/resources/print_preview/search/destination_list.js

Issue 595423002: Take search query into account rendering recent destination list items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | chrome/browser/resources/print_preview/search/recent_destination_list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b929f5164fff31a90b323041211e5240941dada..ed6ce559c68a3e65b0bf81c3445374f0bb703c6f 100644
--- a/chrome/browser/resources/print_preview/search/destination_list.js
+++ b/chrome/browser/resources/print_preview/search/destination_list.js
@@ -231,12 +231,19 @@ cr.define('print_preview', function() {
loadTimeData.getStringF('destinationCount', destinations.length);
setIsVisible(this.getChildElement('.destination-list > footer'), true);
}
- for (var i = 0; i < numItems; i++) {
- var destListItem = new print_preview.DestinationListItem(
- this.eventTarget_, destinations[i], this.query_);
- this.addChild(destListItem);
- destListItem.render(this.getChildElement('.destination-list > ul'));
- }
+ for (var i = 0; i < numItems; i++)
+ this.renderListItemInternal(destinations[i]);
+ },
+
+ /**
+ * @param {!print_preview.Destination} destination Destination to render.
+ * @protected
+ */
+ renderListItemInternal: function(destination) {
+ var listItem = new print_preview.DestinationListItem(
+ this.eventTarget_, destination, this.query_);
+ this.addChild(listItem);
+ listItem.render(this.getChildElement('.destination-list > ul'));
},
/**
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/search/recent_destination_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698