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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 this.removeUserButtonElement.classList.remove('active'); | 317 this.removeUserButtonElement.classList.remove('active'); |
318 this.removeUserButtonElement.textContent = ''; | 318 this.removeUserButtonElement.textContent = ''; |
319 } | 319 } |
320 }, | 320 }, |
321 | 321 |
322 /** | 322 /** |
323 * Updates the image element of the user. | 323 * Updates the image element of the user. |
324 */ | 324 */ |
325 updateUserImage: function() { | 325 updateUserImage: function() { |
326 this.imageElement.src = this.isGuest ? | 326 this.imageElement.src = this.isGuest ? |
327 'chrome://theme/IDR_LOGIN_GUEST' : | 327 'chrome://theme/IDR_LOGIN_GUEST@' + window.devicePixelRatio + 'x' : |
328 'chrome://userimage/' + this.user.username + | 328 'chrome://userimage/' + this.user.username + |
329 '?id=' + (new Date()).getTime() + '&animated'; | 329 '?id=' + (new Date()).getTime() + '&animated'; |
330 }, | 330 }, |
331 | 331 |
332 /** | 332 /** |
333 * Focuses on input element. | 333 * Focuses on input element. |
334 */ | 334 */ |
335 focusInput: function() { | 335 focusInput: function() { |
336 if (!this.isGuest) { | 336 if (!this.isGuest) { |
337 var needSignin = this.needGaiaSignin; | 337 var needSignin = this.needGaiaSignin; |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 chrome.send('loginVisible'); | 919 chrome.send('loginVisible'); |
920 }); | 920 }); |
921 } | 921 } |
922 } | 922 } |
923 }; | 923 }; |
924 | 924 |
925 return { | 925 return { |
926 PodRow: PodRow | 926 PodRow: PodRow |
927 }; | 927 }; |
928 }); | 928 }); |
OLD | NEW |