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 User pod row implementation. | 6 * @fileoverview User pod row implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 this.passwordElement.classList[empty ? 'add' : 'remove']('empty'); | 345 this.passwordElement.classList[empty ? 'add' : 'remove']('empty'); |
346 }, | 346 }, |
347 | 347 |
348 /** | 348 /** |
349 * Updates the image element of the user. | 349 * Updates the image element of the user. |
350 */ | 350 */ |
351 updateUserImage: function() { | 351 updateUserImage: function() { |
352 this.imageElement.src = this.isGuest ? | 352 this.imageElement.src = this.isGuest ? |
353 'chrome://theme/IDR_LOGIN_GUEST' : | 353 'chrome://theme/IDR_LOGIN_GUEST' : |
354 'chrome://userimage/' + this.user.username + | 354 'chrome://userimage/' + this.user.username + |
355 '?id=' + (new Date()).getTime(); | 355 '?id=' + (new Date()).getTime() + '&animated'; |
356 }, | 356 }, |
357 | 357 |
358 /** | 358 /** |
359 * Focuses on input element. | 359 * Focuses on input element. |
360 */ | 360 */ |
361 focusInput: function() { | 361 focusInput: function() { |
362 if (!this.isGuest) { | 362 if (!this.isGuest) { |
363 var needSignin = this.needGaiaSignin; | 363 var needSignin = this.needGaiaSignin; |
364 this.signinButtonElement.hidden = !needSignin; | 364 this.signinButtonElement.hidden = !needSignin; |
365 this.passwordElement.hidden = needSignin; | 365 this.passwordElement.hidden = needSignin; |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 chrome.send('loginVisible'); | 884 chrome.send('loginVisible'); |
885 }); | 885 }); |
886 } | 886 } |
887 } | 887 } |
888 }; | 888 }; |
889 | 889 |
890 return { | 890 return { |
891 PodRow: PodRow | 891 PodRow: PodRow |
892 }; | 892 }; |
893 }); | 893 }); |
OLD | NEW |