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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 POD_INPUT: 1, // Password input field, action box menu button and | 69 POD_INPUT: 1, // Password input field, action box menu button and |
70 // the pod itself. | 70 // the pod itself. |
71 PIN_KEYBOARD: 2, // Pin keyboard below the password input field. | 71 PIN_KEYBOARD: 2, // Pin keyboard below the password input field. |
72 POD_CUSTOM_ICON: 3, // Pod custom icon next to password input field. | 72 POD_CUSTOM_ICON: 3, // Pod custom icon next to password input field. |
73 HEADER_BAR: 4, // Buttons on the header bar (Shutdown, Add User). | 73 HEADER_BAR: 4, // Buttons on the header bar (Shutdown, Add User). |
74 POD_MENU_ITEM: 5 // User pod menu items (User info, Remove user). | 74 POD_MENU_ITEM: 5 // User pod menu items (User info, Remove user). |
75 }; | 75 }; |
76 | 76 |
77 /** | 77 /** |
78 * Supported authentication types. Keep in sync with the enum in | 78 * Supported authentication types. Keep in sync with the enum in |
79 * chrome/browser/signin/screenlock_bridge.h | 79 * components/proximity_auth/public/interfaces/auth_type.mojom |
80 * @enum {number} | 80 * @enum {number} |
81 * @const | 81 * @const |
82 */ | 82 */ |
83 var AUTH_TYPE = { | 83 var AUTH_TYPE = { |
84 OFFLINE_PASSWORD: 0, | 84 OFFLINE_PASSWORD: 0, |
85 ONLINE_SIGN_IN: 1, | 85 ONLINE_SIGN_IN: 1, |
86 NUMERIC_PIN: 2, | 86 NUMERIC_PIN: 2, |
87 USER_CLICK: 3, | 87 USER_CLICK: 3, |
88 EXPAND_THEN_USER_CLICK: 4, | 88 EXPAND_THEN_USER_CLICK: 4, |
89 FORCE_OFFLINE_PASSWORD: 5 | 89 FORCE_OFFLINE_PASSWORD: 5 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 * @const {Array<{type: !number, class: !string}>} | 121 * @const {Array<{type: !number, class: !string}>} |
122 */ | 122 */ |
123 var FINGERPRINT_STATES_MAPPING = [ | 123 var FINGERPRINT_STATES_MAPPING = [ |
124 {state: FINGERPRINT_STATES.HIDDEN, class: 'hidden'}, | 124 {state: FINGERPRINT_STATES.HIDDEN, class: 'hidden'}, |
125 {state: FINGERPRINT_STATES.DEFAULT, class: 'default'}, | 125 {state: FINGERPRINT_STATES.DEFAULT, class: 'default'}, |
126 {state: FINGERPRINT_STATES.SIGNIN, class: 'signin'}, | 126 {state: FINGERPRINT_STATES.SIGNIN, class: 'signin'}, |
127 {state: FINGERPRINT_STATES.FAILED, class: 'failed'} | 127 {state: FINGERPRINT_STATES.FAILED, class: 'failed'} |
128 ]; | 128 ]; |
129 | 129 |
130 // Supported multi-profile user behavior values. | 130 // Supported multi-profile user behavior values. |
131 // Keep in sync with the enum in multi_profile_user_controller.h | 131 // Keep in sync with the enum in login_user_info.mojom |
132 var MULTI_PROFILE_USER_BEHAVIOR = { | 132 var MULTI_PROFILE_USER_BEHAVIOR = { |
133 UNRESTRICTED: 0, | 133 UNRESTRICTED: 0, |
134 PRIMARY_ONLY: 1, | 134 PRIMARY_ONLY: 1, |
135 NOT_ALLOWED: 2, | 135 NOT_ALLOWED: 2, |
136 OWNER_PRIMARY_ONLY: 3 | 136 OWNER_PRIMARY_ONLY: 3 |
137 }; | 137 }; |
138 | 138 |
139 // Focus and tab order are organized as follows: | 139 // Focus and tab order are organized as follows: |
140 // | 140 // |
141 // (1) all user pods have tab index 1 so they are traversed first; | 141 // (1) all user pods have tab index 1 so they are traversed first; |
(...skipping 4555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4697 if (pod && pod.multiProfilesPolicyApplied) { | 4697 if (pod && pod.multiProfilesPolicyApplied) { |
4698 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 4698 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
4699 } | 4699 } |
4700 } | 4700 } |
4701 }; | 4701 }; |
4702 | 4702 |
4703 return { | 4703 return { |
4704 PodRow: PodRow | 4704 PodRow: PodRow |
4705 }; | 4705 }; |
4706 }); | 4706 }); |
OLD | NEW |