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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 POD_INPUT: 1, // Password input field, Action box menu button and | 92 POD_INPUT: 1, // Password input field, Action box menu button and |
93 // the pod itself. | 93 // the pod itself. |
94 PIN_KEYBOARD: 2, // Pin keyboard below the password input field. | 94 PIN_KEYBOARD: 2, // Pin keyboard below the password input field. |
95 POD_CUSTOM_ICON: 3, // Pod custom icon next to password input field. | 95 POD_CUSTOM_ICON: 3, // Pod custom icon next to password input field. |
96 HEADER_BAR: 4, // Buttons on the header bar (Shutdown, Add User). | 96 HEADER_BAR: 4, // Buttons on the header bar (Shutdown, Add User). |
97 POD_MENU_ITEM: 5 // User pad menu items (User info, Remove user). | 97 POD_MENU_ITEM: 5 // User pad menu items (User info, Remove user). |
98 }; | 98 }; |
99 | 99 |
100 /** | 100 /** |
101 * Supported authentication types. Keep in sync with the enum in | 101 * Supported authentication types. Keep in sync with the enum in |
102 * chrome/browser/signin/screenlock_bridge.h | 102 * components/proximity_auth/public/interfaces/auth_type.mojom |
103 * @enum {number} | 103 * @enum {number} |
104 * @const | 104 * @const |
105 */ | 105 */ |
106 var AUTH_TYPE = { | 106 var AUTH_TYPE = { |
107 OFFLINE_PASSWORD: 0, | 107 OFFLINE_PASSWORD: 0, |
108 ONLINE_SIGN_IN: 1, | 108 ONLINE_SIGN_IN: 1, |
109 NUMERIC_PIN: 2, | 109 NUMERIC_PIN: 2, |
110 USER_CLICK: 3, | 110 USER_CLICK: 3, |
111 EXPAND_THEN_USER_CLICK: 4, | 111 EXPAND_THEN_USER_CLICK: 4, |
112 FORCE_OFFLINE_PASSWORD: 5 | 112 FORCE_OFFLINE_PASSWORD: 5 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 * @const {Array<{type: !number, class: !string}>} | 144 * @const {Array<{type: !number, class: !string}>} |
145 */ | 145 */ |
146 var FINGERPRINT_STATES_MAPPING = [ | 146 var FINGERPRINT_STATES_MAPPING = [ |
147 {state: FINGERPRINT_STATES.HIDDEN, class: 'hidden'}, | 147 {state: FINGERPRINT_STATES.HIDDEN, class: 'hidden'}, |
148 {state: FINGERPRINT_STATES.DEFAULT, class: 'default'}, | 148 {state: FINGERPRINT_STATES.DEFAULT, class: 'default'}, |
149 {state: FINGERPRINT_STATES.SIGNIN, class: 'signin'}, | 149 {state: FINGERPRINT_STATES.SIGNIN, class: 'signin'}, |
150 {state: FINGERPRINT_STATES.FAILED, class: 'failed'} | 150 {state: FINGERPRINT_STATES.FAILED, class: 'failed'} |
151 ]; | 151 ]; |
152 | 152 |
153 // Supported multi-profile user behavior values. | 153 // Supported multi-profile user behavior values. |
154 // Keep in sync with the enum in multi_profile_user_controller.h | 154 // Keep in sync with the enum in login_user_info.mojom |
155 var MULTI_PROFILE_USER_BEHAVIOR = { | 155 var MULTI_PROFILE_USER_BEHAVIOR = { |
156 UNRESTRICTED: 0, | 156 UNRESTRICTED: 0, |
157 PRIMARY_ONLY: 1, | 157 PRIMARY_ONLY: 1, |
158 NOT_ALLOWED: 2, | 158 NOT_ALLOWED: 2, |
159 OWNER_PRIMARY_ONLY: 3 | 159 OWNER_PRIMARY_ONLY: 3 |
160 }; | 160 }; |
161 | 161 |
162 // Focus and tab order are organized as follows: | 162 // Focus and tab order are organized as follows: |
163 // | 163 // |
164 // (1) all user pods have tab index 1 so they are traversed first; | 164 // (1) all user pods have tab index 1 so they are traversed first; |
(...skipping 3822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3987 if (pod && pod.multiProfilesPolicyApplied) { | 3987 if (pod && pod.multiProfilesPolicyApplied) { |
3988 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3988 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3989 } | 3989 } |
3990 } | 3990 } |
3991 }; | 3991 }; |
3992 | 3992 |
3993 return { | 3993 return { |
3994 PodRow: PodRow | 3994 PodRow: PodRow |
3995 }; | 3995 }; |
3996 }); | 3996 }); |
OLD | NEW |