Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / resources / print_preview / search / recent_destination_list.js
index 74d8a99..6b17a0f 100644 (file)
@@ -17,7 +17,7 @@ cr.define('print_preview', function() {
     print_preview.DestinationList.call(
         this,
         eventTarget,
-        localStrings.getString('recentDestinationsTitle'));
+        loadTimeData.getString('recentDestinationsTitle'));
   };
 
   RecentDestinationList.prototype = {
@@ -35,12 +35,8 @@ cr.define('print_preview', function() {
                    destinations.length == 0);
       setIsVisible(this.getChildElement('.destination-list > footer'), false);
       var numItems = Math.min(destinations.length, this.shortListSize_);
-      for (var i = 0; i < numItems; i++) {
-        var destListItem = new print_preview.DestinationListItem(
-            this.eventTarget_, destinations[i]);
-        this.addChild(destListItem);
-        destListItem.render(this.getChildElement('.destination-list > ul'));
-      }
+      for (var i = 0; i < numItems; i++)
+        this.renderListItemInternal(destinations[i]);
     }
   };