Chromium Code Reviews| Index: chrome/browser/resources/chromeos/user_images_grid.js |
| diff --git a/chrome/browser/resources/chromeos/user_images_grid.js b/chrome/browser/resources/chromeos/user_images_grid.js |
| index adcf6a7357bf17b1ba57db96ef7f2f0418545cdb..cd4abb5683c9913a8cdb857c6cc4c0ce2c226aac 100644 |
| --- a/chrome/browser/resources/chromeos/user_images_grid.js |
| +++ b/chrome/browser/resources/chromeos/user_images_grid.js |
| @@ -635,6 +635,21 @@ cr.define('options', function() { |
| this.columns = 0; |
| this.redraw(); |
| this.focus(); |
| + }, |
| + |
| + /** |
| + * Appends default images to the image grid. Should only be called once. |
| + * @param {Array.<{url: string, author: string, website: string}>} |
|
Daniel Erat
2015/02/12 14:18:10
this comment doesn't mention a "title" property, b
|
| + * imagesData |
| + * An array of default images data, including URL, author and website. |
| + */ |
| + setDefaultImages: function(imagesData) { |
| + for (var i = 0, data; data = imagesData[i]; i++) { |
| + var item = this.addItem(data.url, data.title); |
| + item.type = 'default'; |
| + item.author = data.author || ''; |
| + item.website = data.website || ''; |
| + } |
| } |
| }; |