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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js

Issue 10376003: Improve accessibility of user image selection screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments by ivankr Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 10
11 var UserImagesGrid = options.UserImagesGrid; 11 var UserImagesGrid = options.UserImagesGrid;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 if (imageUrl !== null) { 284 if (imageUrl !== null) {
285 this.profileImagePresent_ = true; 285 this.profileImagePresent_ = true;
286 this.profileImageUrl_ = imageUrl; 286 this.profileImageUrl_ = imageUrl;
287 this.profileImage_ = 287 this.profileImage_ =
288 $('user-image-grid').updateItem(this.profileImage_, imageUrl); 288 $('user-image-grid').updateItem(this.profileImage_, imageUrl);
289 } 289 }
290 }, 290 },
291 291
292 /** 292 /**
293 * Appends received images to the list. 293 * Appends received images to the list.
294 * @param {Array.<string>} images An array of URLs to user images. 294 * @param {Array.<Object>} imageInfos An array of data about user images.
295 * @private 295 * @private
296 */ 296 */
297 setUserImages_: function(images) { 297 setUserImages_: function(imageInfos) {
298 var imageGrid = $('user-image-grid'); 298 var imageGrid = $('user-image-grid');
299 for (var i = 0, url; url = images[i]; i++) 299 for (var i = 0, imageInfo; imageInfo = imageInfos[i]; i++)
300 imageGrid.addItem(url); 300 imageGrid.addItem(imageInfo.url, imageInfo.title);
301 }, 301 },
302 302
303 /** 303 /**
304 * Selects user image with the given URL. 304 * Selects user image with the given URL.
305 * @param {string} url URL of the image to select. 305 * @param {string} url URL of the image to select.
306 * @private 306 * @private
307 */ 307 */
308 setSelectedImage_: function(url) { 308 setSelectedImage_: function(url) {
309 var imageGrid = $('user-image-grid'); 309 var imageGrid = $('user-image-grid');
310 imageGrid.selectedItemUrl = url; 310 imageGrid.selectedItemUrl = url;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 ].forEach(function(name) { 348 ].forEach(function(name) {
349 UserImageScreen[name] = function(value) { 349 UserImageScreen[name] = function(value) {
350 $('user-image')[name + '_'](value); 350 $('user-image')[name + '_'](value);
351 }; 351 };
352 }); 352 });
353 353
354 return { 354 return {
355 UserImageScreen: UserImageScreen 355 UserImageScreen: UserImageScreen
356 }; 356 };
357 }); 357 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698