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

Side by Side Diff: ui/login/display_manager.js

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 6 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 | « ui/login/account_picker/user_pod_row.js ('k') | ui/login/resource_loader.js » ('j') | 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 Display manager for WebUI OOBE and login. 6 * @fileoverview Display manager for WebUI OOBE and login.
7 */ 7 */
8 8
9 // TODO(xiyuan): Find a better to share those constants. 9 // TODO(xiyuan): Find a better to share those constants.
10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect'; 10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect';
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 * The value is used as the duration for ensureTransitionEndEvent below. 99 * The value is used as the duration for ensureTransitionEndEvent below.
100 * It needs to be inline with the step screen transition duration time 100 * It needs to be inline with the step screen transition duration time
101 * defined in css file. The current value in css is 200ms. To avoid emulated 101 * defined in css file. The current value in css is 200ms. To avoid emulated
102 * webkitTransitionEnd fired before real one, 250ms is used. 102 * webkitTransitionEnd fired before real one, 250ms is used.
103 * @const 103 * @const
104 */ 104 */
105 var MAX_SCREEN_TRANSITION_DURATION = 250; 105 var MAX_SCREEN_TRANSITION_DURATION = 250;
106 106
107 /** 107 /**
108 * Groups of screens (screen IDs) that should have the same dimensions. 108 * Groups of screens (screen IDs) that should have the same dimensions.
109 * @type Array.<Array.<string>> 109 * @type Array<Array<string>>
110 * @const 110 * @const
111 */ 111 */
112 var SCREEN_GROUPS = [[SCREEN_OOBE_NETWORK, 112 var SCREEN_GROUPS = [[SCREEN_OOBE_NETWORK,
113 SCREEN_OOBE_EULA, 113 SCREEN_OOBE_EULA,
114 SCREEN_OOBE_UPDATE, 114 SCREEN_OOBE_UPDATE,
115 SCREEN_OOBE_AUTO_ENROLLMENT_CHECK] 115 SCREEN_OOBE_AUTO_ENROLLMENT_CHECK]
116 ]; 116 ];
117 /** 117 /**
118 * Group of screens (screen IDs) where factory-reset screen invocation is 118 * Group of screens (screen IDs) where factory-reset screen invocation is
119 * available. 119 * available.
120 * @type Array.<string> 120 * @type Array<string>
121 * @const 121 * @const
122 */ 122 */
123 var RESET_AVAILABLE_SCREEN_GROUP = [ 123 var RESET_AVAILABLE_SCREEN_GROUP = [
124 SCREEN_OOBE_NETWORK, 124 SCREEN_OOBE_NETWORK,
125 SCREEN_OOBE_EULA, 125 SCREEN_OOBE_EULA,
126 SCREEN_OOBE_UPDATE, 126 SCREEN_OOBE_UPDATE,
127 SCREEN_OOBE_ENROLLMENT, 127 SCREEN_OOBE_ENROLLMENT,
128 SCREEN_OOBE_AUTO_ENROLLMENT_CHECK, 128 SCREEN_OOBE_AUTO_ENROLLMENT_CHECK,
129 SCREEN_GAIA_SIGNIN, 129 SCREEN_GAIA_SIGNIN,
130 SCREEN_ACCOUNT_PICKER, 130 SCREEN_ACCOUNT_PICKER,
131 SCREEN_KIOSK_ENABLE, 131 SCREEN_KIOSK_ENABLE,
132 SCREEN_ERROR_MESSAGE, 132 SCREEN_ERROR_MESSAGE,
133 SCREEN_USER_IMAGE_PICKER, 133 SCREEN_USER_IMAGE_PICKER,
134 SCREEN_TPM_ERROR, 134 SCREEN_TPM_ERROR,
135 SCREEN_PASSWORD_CHANGED, 135 SCREEN_PASSWORD_CHANGED,
136 SCREEN_TERMS_OF_SERVICE, 136 SCREEN_TERMS_OF_SERVICE,
137 SCREEN_WRONG_HWID, 137 SCREEN_WRONG_HWID,
138 SCREEN_CONFIRM_PASSWORD, 138 SCREEN_CONFIRM_PASSWORD,
139 SCREEN_FATAL_ERROR 139 SCREEN_FATAL_ERROR
140 ]; 140 ];
141 141
142 /** 142 /**
143 * Group of screens (screen IDs) where enable debuggingscreen invocation is 143 * Group of screens (screen IDs) where enable debuggingscreen invocation is
144 * available. 144 * available.
145 * @type Array.<string> 145 * @type Array<string>
146 * @const 146 * @const
147 */ 147 */
148 var ENABLE_DEBUGGING_AVAILABLE_SCREEN_GROUP = [ 148 var ENABLE_DEBUGGING_AVAILABLE_SCREEN_GROUP = [
149 SCREEN_OOBE_HID_DETECTION, 149 SCREEN_OOBE_HID_DETECTION,
150 SCREEN_OOBE_NETWORK, 150 SCREEN_OOBE_NETWORK,
151 SCREEN_OOBE_EULA, 151 SCREEN_OOBE_EULA,
152 SCREEN_OOBE_UPDATE, 152 SCREEN_OOBE_UPDATE,
153 SCREEN_TERMS_OF_SERVICE 153 SCREEN_TERMS_OF_SERVICE
154 ]; 154 ];
155 155
156 /** 156 /**
157 * Group of screens (screen IDs) that are not participating in 157 * Group of screens (screen IDs) that are not participating in
158 * left-current-right animation. 158 * left-current-right animation.
159 * @type Array.<string> 159 * @type Array<string>
160 * @const 160 * @const
161 */ 161 */
162 var NOT_ANIMATED_SCREEN_GROUP = [ 162 var NOT_ANIMATED_SCREEN_GROUP = [
163 SCREEN_OOBE_ENABLE_DEBUGGING, 163 SCREEN_OOBE_ENABLE_DEBUGGING,
164 SCREEN_OOBE_RESET, 164 SCREEN_OOBE_RESET,
165 ]; 165 ];
166 166
167 167
168 /** 168 /**
169 * OOBE screens group index. 169 * OOBE screens group index.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 // Handle special accelerators for keyboard enhanced navigation flow. 424 // Handle special accelerators for keyboard enhanced navigation flow.
425 if (name == ACCELERATOR_FOCUS_PREV) 425 if (name == ACCELERATOR_FOCUS_PREV)
426 keyboard.raiseKeyFocusPrevious(document.activeElement); 426 keyboard.raiseKeyFocusPrevious(document.activeElement);
427 else if (name == ACCELERATOR_FOCUS_NEXT) 427 else if (name == ACCELERATOR_FOCUS_NEXT)
428 keyboard.raiseKeyFocusNext(document.activeElement); 428 keyboard.raiseKeyFocusNext(document.activeElement);
429 }, 429 },
430 430
431 /** 431 /**
432 * Appends buttons to the button strip. 432 * Appends buttons to the button strip.
433 * @param {Array.<HTMLElement>} buttons Array with the buttons to append. 433 * @param {Array<HTMLElement>} buttons Array with the buttons to append.
434 * @param {string} screenId Id of the screen that buttons belong to. 434 * @param {string} screenId Id of the screen that buttons belong to.
435 */ 435 */
436 appendButtons_: function(buttons, screenId) { 436 appendButtons_: function(buttons, screenId) {
437 if (buttons) { 437 if (buttons) {
438 var buttonStrip = $(screenId + '-controls'); 438 var buttonStrip = $(screenId + '-controls');
439 if (buttonStrip) { 439 if (buttonStrip) {
440 for (var i = 0; i < buttons.length; ++i) 440 for (var i = 0; i < buttons.length; ++i)
441 buttonStrip.appendChild(buttons[i]); 441 buttonStrip.appendChild(buttons[i]);
442 } 442 }
443 } 443 }
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 */ 1089 */
1090 DisplayManager.refocusCurrentPod = function() { 1090 DisplayManager.refocusCurrentPod = function() {
1091 $('pod-row').refocusCurrentPod(); 1091 $('pod-row').refocusCurrentPod();
1092 }; 1092 };
1093 1093
1094 // Export 1094 // Export
1095 return { 1095 return {
1096 DisplayManager: DisplayManager 1096 DisplayManager: DisplayManager
1097 }; 1097 };
1098 }); 1098 });
OLDNEW
« no previous file with comments | « ui/login/account_picker/user_pod_row.js ('k') | ui/login/resource_loader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698