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

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

Issue 8576013: [cros] Fix repetitive image selection bug in OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 Oobe.getInstance().headerHidden = true; 224 Oobe.getInstance().headerHidden = true;
225 $('user-image-grid').updateAndFocus(); 225 $('user-image-grid').updateAndFocus();
226 chrome.send('onUserImageScreenShown'); 226 chrome.send('onUserImageScreenShown');
227 }, 227 },
228 228
229 /** 229 /**
230 * Accepts currently selected image, if possible. 230 * Accepts currently selected image, if possible.
231 * @private 231 * @private
232 */ 232 */
233 acceptImage_: function() { 233 acceptImage_: function() {
234 if (!$('ok-button').disabled) 234 var okButton = $('ok-button');
235 if (!okButton.disabled) {
236 // This ensures that #ok-button won't be re-enabled again.
237 $('user-image-grid').disabled = true;
238 okButton.disabled = true;
235 chrome.send('onUserImageAccepted'); 239 chrome.send('onUserImageAccepted');
240 }
236 }, 241 },
237 242
238 /** 243 /**
239 * Notifies about camera presence change. 244 * Notifies about camera presence change.
240 * @param {boolean} present Whether a camera is present or not. 245 * @param {boolean} present Whether a camera is present or not.
241 * @private 246 * @private
242 */ 247 */
243 setCameraPresent_: function(present) { 248 setCameraPresent_: function(present) {
244 var imageGrid = $('user-image-grid'); 249 var imageGrid = $('user-image-grid');
245 if (present && !this.takePhotoButton_) { 250 if (present && !this.takePhotoButton_) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 ].forEach(function(name) { 332 ].forEach(function(name) {
328 UserImageScreen[name] = function(value) { 333 UserImageScreen[name] = function(value) {
329 $('user-image')[name + '_'](value); 334 $('user-image')[name + '_'](value);
330 }; 335 };
331 }); 336 });
332 337
333 return { 338 return {
334 UserImageScreen: UserImageScreen 339 UserImageScreen: UserImageScreen
335 }; 340 };
336 }); 341 });
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