Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 2361193002: Fix clicks on Public Session login page after OOBE (Closed)
Patch Set: Only load pin keyboard on Lock screen Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 var isLockScreen = (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK);
775 if (cr.isChromeOS && isLockScreen &&
776 !cr.ui.login.ResourceLoader.alreadyLoadedAssets(
Greg Levin 2016/09/23 16:12:40 As per offline discussion, switched this to only a
775 'custom-elements-user-pod')) { 777 'custom-elements-user-pod')) {
776 cr.ui.login.ResourceLoader.registerAssets({ 778 cr.ui.login.ResourceLoader.registerAssets({
777 id: 'custom-elements-user-pod', 779 id: 'custom-elements-user-pod',
778 html: [{ url: 'custom_elements_user_pod.html' }] 780 html: [{ url: 'custom_elements_user_pod.html' }]
779 }); 781 });
780 cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements-user-pod'); 782 cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements-user-pod');
781 } 783 }
782 }, 784 },
783 785
784 /** 786 /**
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 */ 890 */
889 get passwordElement() { 891 get passwordElement() {
890 return this.querySelector('.password'); 892 return this.querySelector('.password');
891 }, 893 },
892 894
893 /** 895 /**
894 * Gets submit button. 896 * Gets submit button.
895 * @type {!HTMLInputElement} 897 * @type {!HTMLInputElement}
896 */ 898 */
897 get submitButton() { 899 get submitButton() {
898 return this.querySelector('.submit-button'); 900 return this.user_.publicAccount ? null :
901 this.querySelector('.submit-button');
Greg Levin 2016/09/23 16:12:40 Since I'm not using this in the if-condition above
xiyuan 2016/09/23 16:26:00 I would vote for revert since it is not needed for
Greg Levin 2016/09/23 18:23:09 Done.
899 }, 902 },
900 903
901 /** 904 /**
902 * Gets the password label, which is used to show a message where the 905 * Gets the password label, which is used to show a message where the
903 * password field is normally. 906 * password field is normally.
904 * @type {!HTMLInputElement} 907 * @type {!HTMLInputElement}
905 */ 908 */
906 get passwordLabelElement() { 909 get passwordLabelElement() {
907 return this.querySelector('.password-label'); 910 return this.querySelector('.password-label');
908 }, 911 },
(...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 else 3242 else
3240 pod.classList.remove('faded'); 3243 pod.classList.remove('faded');
3241 pod.reset(false); 3244 pod.reset(false);
3242 } 3245 }
3243 } 3246 }
3244 3247
3245 // Clear any error messages for previous pod. 3248 // Clear any error messages for previous pod.
3246 if (!this.isFocused(podToFocus)) 3249 if (!this.isFocused(podToFocus))
3247 Oobe.clearErrors(); 3250 Oobe.clearErrors();
3248 3251
3249 var hadFocus = !!this.focusedPod_;
Greg Levin 2016/09/23 16:12:40 This variable doesn't appear to be used anywhere.
xiyuan 2016/09/23 16:26:01 Let's remove it then.
Greg Levin 2016/09/23 18:23:09 Done.
3250 this.focusedPod_ = podToFocus; 3252 this.focusedPod_ = podToFocus;
3251 if (podToFocus) { 3253 if (podToFocus) {
3252 // Only show the keyboard if it is fully loaded. 3254 // Only show the keyboard if it is fully loaded.
3253 if (podToFocus.isPinReady()) 3255 if (podToFocus.isPinReady())
3254 podToFocus.setPinVisibility(true); 3256 podToFocus.setPinVisibility(true);
3255 podToFocus.classList.remove('faded'); 3257 podToFocus.classList.remove('faded');
3256 podToFocus.classList.add('focused'); 3258 podToFocus.classList.add('focused');
3257 if (!podToFocus.multiProfilesPolicyApplied) { 3259 if (!podToFocus.multiProfilesPolicyApplied) {
3258 podToFocus.classList.toggle('signing-in', false); 3260 podToFocus.classList.toggle('signing-in', false);
3259 if (!opt_skipInputFocus) 3261 if (!opt_skipInputFocus)
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698