OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Oobe user image screen implementation. | 6 * @fileoverview Oobe user image screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('oobe', function() { | 9 cr.define('oobe', function() { |
10 var UserImagesGrid = options.UserImagesGrid; | 10 var UserImagesGrid = options.UserImagesGrid; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } | 285 } |
286 }, | 286 }, |
287 | 287 |
288 /** | 288 /** |
289 * Appends default images to the image grid. Should only be called once. | 289 * Appends default images to the image grid. Should only be called once. |
290 * @param {Array.<{url: string, author: string, website: string, | 290 * @param {Array.<{url: string, author: string, website: string, |
291 * title: string}>} images An array of default images data, | 291 * title: string}>} images An array of default images data, |
292 * including URL, title, author and website. | 292 * including URL, title, author and website. |
293 * @private | 293 * @private |
294 */ | 294 */ |
295 setDefaultImages_: function(images) { | 295 setDefaultImages_: function(imagesData) { |
296 var imageGrid = $('user-image-grid'); | 296 var imageGrid = $('user-image-grid'); |
297 for (var i = 0, data; data = imagesData[i]; i++) { | 297 for (var i = 0, data; data = imagesData[i]; i++) { |
298 imageGrid.addItem(data.url, data.title); | 298 imageGrid.addItem(data.url, data.title); |
299 } | 299 } |
300 }, | 300 }, |
301 | 301 |
302 /** | 302 /** |
303 * Selects user image with the given URL. | 303 * Selects user image with the given URL. |
304 * @param {string} url URL of the image to select. | 304 * @param {string} url URL of the image to select. |
305 * @private | 305 * @private |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 ].forEach(function(name) { | 607 ].forEach(function(name) { |
608 UserImageScreen[name] = function(value) { | 608 UserImageScreen[name] = function(value) { |
609 $('user-image')[name + '_'](value); | 609 $('user-image')[name + '_'](value); |
610 }; | 610 }; |
611 }); | 611 }); |
612 | 612 |
613 return { | 613 return { |
614 UserImageScreen: UserImageScreen | 614 UserImageScreen: UserImageScreen |
615 }; | 615 }; |
616 }); | 616 }); |
OLD | NEW |