OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 focusInput: function() { | 1954 focusInput: function() { |
1955 // Move tabIndex from the whole pod to the main input. | 1955 // Move tabIndex from the whole pod to the main input. |
1956 this.tabIndex = -1; | 1956 this.tabIndex = -1; |
1957 this.mainInput.tabIndex = UserPodTabOrder.POD_INPUT; | 1957 this.mainInput.tabIndex = UserPodTabOrder.POD_INPUT; |
1958 this.mainInput.focus(); | 1958 this.mainInput.focus(); |
1959 }, | 1959 }, |
1960 | 1960 |
1961 /** @override */ | 1961 /** @override */ |
1962 activate: function(e) { | 1962 activate: function(e) { |
1963 if (!this.user.needsSignin) { | 1963 if (!this.user.needsSignin) { |
1964 Oobe.launchUser(this.user.emailAddress, this.user.displayName); | 1964 Oobe.launchUser(this.user.profilePath); |
1965 } else if (!this.passwordElement.value) { | 1965 } else if (!this.passwordElement.value) { |
1966 return false; | 1966 return false; |
1967 } else { | 1967 } else { |
1968 chrome.send('authenticatedLaunchUser', | 1968 chrome.send('authenticatedLaunchUser', |
1969 [this.user.emailAddress, | 1969 [this.user.profilePath, |
1970 this.user.displayName, | 1970 this.user.emailAddress, |
1971 this.passwordElement.value]); | 1971 this.passwordElement.value]); |
1972 } | 1972 } |
1973 this.passwordElement.value = ''; | 1973 this.passwordElement.value = ''; |
1974 return true; | 1974 return true; |
1975 }, | 1975 }, |
1976 | 1976 |
1977 /** @override */ | 1977 /** @override */ |
1978 handleClickOnPod_: function(e) { | 1978 handleClickOnPod_: function(e) { |
1979 if (this.parentNode.disabled) | 1979 if (this.parentNode.disabled) |
1980 return; | 1980 return; |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3133 if (pod && pod.multiProfilesPolicyApplied) { | 3133 if (pod && pod.multiProfilesPolicyApplied) { |
3134 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3134 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3135 } | 3135 } |
3136 } | 3136 } |
3137 }; | 3137 }; |
3138 | 3138 |
3139 return { | 3139 return { |
3140 PodRow: PodRow | 3140 PodRow: PodRow |
3141 }; | 3141 }; |
3142 }); | 3142 }); |
OLD | NEW |