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

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

Issue 8775013: [cros] Refresh all localized content on image screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 imageGrid.focus(); 312 imageGrid.focus();
313 }, 313 },
314 314
315 /** 315 /**
316 * Updates the image preview caption. 316 * Updates the image preview caption.
317 * @private 317 * @private
318 */ 318 */
319 updateCaption_: function() { 319 updateCaption_: function() {
320 $('user-image-preview-caption').textContent = 320 $('user-image-preview-caption').textContent =
321 this.profileImageSelected ? this.profileImageCaption : ''; 321 this.profileImageSelected ? this.profileImageCaption : '';
322 },
323
324 /**
325 * Updates localized content of the screen that is not updated via template.
326 * @public
327 */
328 updateLocalizedContent: function() {
Ivan Korotkov 2011/12/01 17:59:50 Can we eliminate the duplication be calling this f
Nikita (slow) 2011/12/02 10:06:35 Refactored. I'd prefer not calling updateLocalized
329 this.profileImageCaption = localStrings.getString(
330 this.profileImageLoading_ ? 'profilePhotoLoading' : 'profilePhoto');
322 } 331 }
323 }; 332 };
324 333
325 // Forward public APIs to private implementations. 334 // Forward public APIs to private implementations.
326 [ 335 [
327 'setCameraPresent', 336 'setCameraPresent',
328 'setProfileImage', 337 'setProfileImage',
329 'setSelectedImage', 338 'setSelectedImage',
330 'setUserImages', 339 'setUserImages',
331 'setUserPhoto', 340 'setUserPhoto',
332 ].forEach(function(name) { 341 ].forEach(function(name) {
333 UserImageScreen[name] = function(value) { 342 UserImageScreen[name] = function(value) {
334 $('user-image')[name + '_'](value); 343 $('user-image')[name + '_'](value);
335 }; 344 };
336 }); 345 });
337 346
338 return { 347 return {
339 UserImageScreen: UserImageScreen 348 UserImageScreen: UserImageScreen
340 }; 349 };
341 }); 350 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698