| 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('login', function() { | 9 cr.define('login', function() { |
| 10 var UserImagesGrid = options.UserImagesGrid; | 10 var UserImagesGrid = options.UserImagesGrid; |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 notifyImageSelected_: function() { | 437 notifyImageSelected_: function() { |
| 438 var imageGrid = $('user-image-grid'); | 438 var imageGrid = $('user-image-grid'); |
| 439 chrome.send('selectImage', | 439 chrome.send('selectImage', |
| 440 [imageGrid.selectedItemUrl, | 440 [imageGrid.selectedItemUrl, |
| 441 imageGrid.selectionType, | 441 imageGrid.selectionType, |
| 442 !imageGrid.inProgramSelection]); | 442 !imageGrid.inProgramSelection]); |
| 443 }, | 443 }, |
| 444 }; | 444 }; |
| 445 | 445 |
| 446 // Forward public APIs to private implementations. | 446 // Forward public APIs to private implementations. |
| 447 [ | 447 cr.makePublic(UserImageScreen, [ |
| 448 'setDefaultImages', | 448 'setDefaultImages', |
| 449 'setCameraPresent', | 449 'setCameraPresent', |
| 450 'setProfilePictureEnabled', | 450 'setProfilePictureEnabled', |
| 451 'setProfileImage', | 451 'setProfileImage', |
| 452 'setSelectedImage', | 452 'setSelectedImage', |
| 453 'hideCurtain' | 453 'hideCurtain' |
| 454 ].forEach(function(name) { | 454 ], $('user-image')); |
| 455 UserImageScreen[name] = function(value) { | |
| 456 $('user-image')[name + '_'](value); | |
| 457 }; | |
| 458 }); | |
| 459 | 455 |
| 460 return { | 456 return { |
| 461 UserImageScreen: UserImageScreen | 457 UserImageScreen: UserImageScreen |
| 462 }; | 458 }; |
| 463 }); | 459 }); |
| 464 | 460 |
| OLD | NEW |