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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 | 6 |
7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
8 var UserImagesGrid = options.UserImagesGrid; | 8 var UserImagesGrid = options.UserImagesGrid; |
9 var ButtonImages = UserImagesGrid.ButtonImages; | 9 var ButtonImages = UserImagesGrid.ButtonImages; |
10 | 10 |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 break; | 408 break; |
409 } | 409 } |
410 }, | 410 }, |
411 | 411 |
412 /** | 412 /** |
413 * URL of the current user image. | 413 * URL of the current user image. |
414 * @type {string} | 414 * @type {string} |
415 */ | 415 */ |
416 get currentUserImageUrl() { | 416 get currentUserImageUrl() { |
417 return 'chrome://userimage/' + BrowserOptions.getLoggedInUsername() + | 417 return 'chrome://userimage/' + BrowserOptions.getLoggedInUsername() + |
418 '?id=' + (new Date()).getTime() + '&animated'; | 418 '?id=' + new Date().getTime(); |
419 }, | 419 }, |
420 | 420 |
421 /** | 421 /** |
422 * Adds or updates old user image taken from file/camera (neither a profile | 422 * Adds or updates old user image taken from file/camera (neither a profile |
423 * image nor a default one). | 423 * image nor a default one). |
424 * @private | 424 * @private |
425 */ | 425 */ |
426 setOldImage_: function() { | 426 setOldImage_: function() { |
427 var imageGrid = $('user-image-grid'); | 427 var imageGrid = $('user-image-grid'); |
428 var url = this.currentUserImageUrl; | 428 var url = this.currentUserImageUrl; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 return instance[name + '_'].apply(instance, arguments); | 485 return instance[name + '_'].apply(instance, arguments); |
486 }; | 486 }; |
487 }); | 487 }); |
488 | 488 |
489 // Export | 489 // Export |
490 return { | 490 return { |
491 ChangePictureOptions: ChangePictureOptions | 491 ChangePictureOptions: ChangePictureOptions |
492 }; | 492 }; |
493 | 493 |
494 }); | 494 }); |
OLD | NEW |