Chromium Code Reviews| 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 764 this.imageElement.addEventListener('load', | 764 this.imageElement.addEventListener('load', |
| 765 this.parentNode.handlePodImageLoad.bind(this.parentNode, this)); | 765 this.parentNode.handlePodImageLoad.bind(this.parentNode, this)); |
| 766 | 766 |
| 767 var initialAuthType = this.user.initialAuthType || | 767 var initialAuthType = this.user.initialAuthType || |
| 768 AUTH_TYPE.OFFLINE_PASSWORD; | 768 AUTH_TYPE.OFFLINE_PASSWORD; |
| 769 this.setAuthType(initialAuthType, null); | 769 this.setAuthType(initialAuthType, null); |
| 770 | 770 |
| 771 this.userClickAuthAllowed_ = false; | 771 this.userClickAuthAllowed_ = false; |
| 772 | 772 |
| 773 // Lazy load the assets needed for the polymer submit button. | 773 // Lazy load the assets needed for the polymer submit button. |
| 774 if (cr.isChromeOS && !cr.ui.login.ResourceLoader.alreadyLoadedAssets( | 774 if (cr.isChromeOS && this.submitButton && |
| 775 !cr.ui.login.ResourceLoader.alreadyLoadedAssets( | |
|
Greg Levin
2016/09/22 20:31:39
I assume this condition makes sense, and that this
jdufault
2016/09/22 20:52:20
Discussed a bit offline. We should probably just a
| |
| 775 'custom-elements-user-pod')) { | 776 'custom-elements-user-pod')) { |
| 776 cr.ui.login.ResourceLoader.registerAssets({ | 777 cr.ui.login.ResourceLoader.registerAssets({ |
| 777 id: 'custom-elements-user-pod', | 778 id: 'custom-elements-user-pod', |
| 778 html: [{ url: 'custom_elements_user_pod.html' }] | 779 html: [{ url: 'custom_elements_user_pod.html' }] |
| 779 }); | 780 }); |
| 780 cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements-user-pod'); | 781 cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements-user-pod'); |
|
Greg Levin
2016/09/22 20:31:39
After OOBE completed and the Public Session user p
| |
| 781 } | 782 } |
| 782 }, | 783 }, |
| 783 | 784 |
| 784 /** | 785 /** |
| 785 * Resets tab order for pod elements to its initial state. | 786 * Resets tab order for pod elements to its initial state. |
| 786 */ | 787 */ |
| 787 resetTabOrder: function() { | 788 resetTabOrder: function() { |
| 788 // Note: the |mainInput| can be the pod itself. | 789 // Note: the |mainInput| can be the pod itself. |
| 789 this.mainInput.tabIndex = -1; | 790 this.mainInput.tabIndex = -1; |
| 790 this.tabIndex = UserPodTabOrder.POD_INPUT; | 791 this.tabIndex = UserPodTabOrder.POD_INPUT; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 888 */ | 889 */ |
| 889 get passwordElement() { | 890 get passwordElement() { |
| 890 return this.querySelector('.password'); | 891 return this.querySelector('.password'); |
| 891 }, | 892 }, |
| 892 | 893 |
| 893 /** | 894 /** |
| 894 * Gets submit button. | 895 * Gets submit button. |
| 895 * @type {!HTMLInputElement} | 896 * @type {!HTMLInputElement} |
| 896 */ | 897 */ |
| 897 get submitButton() { | 898 get submitButton() { |
| 898 return this.querySelector('.submit-button'); | 899 return this.user_.publicAccount ? null : |
| 900 this.querySelector('.submit-button'); | |
|
Greg Levin
2016/09/22 20:31:39
Public Session pods don't have Submit buttons. Is
| |
| 899 }, | 901 }, |
| 900 | 902 |
| 901 /** | 903 /** |
| 902 * Gets the password label, which is used to show a message where the | 904 * Gets the password label, which is used to show a message where the |
| 903 * password field is normally. | 905 * password field is normally. |
| 904 * @type {!HTMLInputElement} | 906 * @type {!HTMLInputElement} |
| 905 */ | 907 */ |
| 906 get passwordLabelElement() { | 908 get passwordLabelElement() { |
| 907 return this.querySelector('.password-label'); | 909 return this.querySelector('.password-label'); |
| 908 }, | 910 }, |
| (...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3650 if (pod && pod.multiProfilesPolicyApplied) { | 3652 if (pod && pod.multiProfilesPolicyApplied) { |
| 3651 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3653 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3652 } | 3654 } |
| 3653 } | 3655 } |
| 3654 }; | 3656 }; |
| 3655 | 3657 |
| 3656 return { | 3658 return { |
| 3657 PodRow: PodRow | 3659 PodRow: PodRow |
| 3658 }; | 3660 }; |
| 3659 }); | 3661 }); |
| OLD | NEW |