| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 this.focusedPod_ = undefined; | 642 this.focusedPod_ = undefined; |
| 643 this.activatedPod_ = undefined; | 643 this.activatedPod_ = undefined; |
| 644 | 644 |
| 645 // Populate the pod row. | 645 // Populate the pod row. |
| 646 for (var i = 0; i < users.length; ++i) { | 646 for (var i = 0; i < users.length; ++i) { |
| 647 this.addUserPod(users[i], animated); | 647 this.addUserPod(users[i], animated); |
| 648 } | 648 } |
| 649 for (var i = 0, pod; pod = this.pods[i]; ++i) { | 649 for (var i = 0, pod; pod = this.pods[i]; ++i) { |
| 650 this.podsWithPendingImages_.push(pod); | 650 this.podsWithPendingImages_.push(pod); |
| 651 } | 651 } |
| 652 | |
| 653 // Set titles for the pods. The title will show up as a tooltip. | |
| 654 updateTitles(); | |
| 655 }, | 652 }, |
| 656 | 653 |
| 657 /** | 654 /** |
| 658 * Focuses a given user pod or clear focus when given null. | 655 * Focuses a given user pod or clear focus when given null. |
| 659 * @param {UserPod=} podToFocus User pod to focus (undefined clears focus). | 656 * @param {UserPod=} podToFocus User pod to focus (undefined clears focus). |
| 660 * @param {boolean=} opt_force If true, forces focus update even when | 657 * @param {boolean=} opt_force If true, forces focus update even when |
| 661 * podToFocus is already focused. | 658 * podToFocus is already focused. |
| 662 */ | 659 */ |
| 663 focusPod: function(podToFocus, opt_force) { | 660 focusPod: function(podToFocus, opt_force) { |
| 664 if (this.focusedPod_ == podToFocus && !opt_force) | 661 if (this.focusedPod_ == podToFocus && !opt_force) |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 chrome.send('loginVisible'); | 898 chrome.send('loginVisible'); |
| 902 }); | 899 }); |
| 903 } | 900 } |
| 904 } | 901 } |
| 905 }; | 902 }; |
| 906 | 903 |
| 907 return { | 904 return { |
| 908 PodRow: PodRow | 905 PodRow: PodRow |
| 909 }; | 906 }; |
| 910 }); | 907 }); |
| OLD | NEW |