| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 oldStep.classList.contains('right')) { | 229 oldStep.classList.contains('right')) { |
| 230 innerContainer.classList.remove('animation'); | 230 innerContainer.classList.remove('animation'); |
| 231 oldStep.classList.add('hidden'); | 231 oldStep.classList.add('hidden'); |
| 232 } | 232 } |
| 233 }); | 233 }); |
| 234 } else { | 234 } else { |
| 235 oldStep.classList.add('hidden'); | 235 oldStep.classList.add('hidden'); |
| 236 } | 236 } |
| 237 } else { | 237 } else { |
| 238 // First screen on OOBE launch. | 238 // First screen on OOBE launch. |
| 239 innerContainer.classList.remove('down'); | 239 if (innerContainer.classList.contains('down')) { |
| 240 innerContainer.addEventListener( | 240 innerContainer.classList.remove('down'); |
| 241 'webkitTransitionEnd', function f(e) { | 241 innerContainer.addEventListener( |
| 242 innerContainer.removeEventListener('webkitTransitionEnd', f); | 242 'webkitTransitionEnd', function f(e) { |
| 243 $('progress-dots').classList.remove('down'); | 243 innerContainer.removeEventListener('webkitTransitionEnd', f); |
| 244 }); | 244 $('progress-dots').classList.remove('down'); |
| 245 chrome.send('loginVisible'); |
| 246 }); |
| 247 } |
| 245 newHeader.classList.remove('right'); // Old OOBE. | 248 newHeader.classList.remove('right'); // Old OOBE. |
| 246 // Report back first OOBE screen being painted. | |
| 247 window.webkitRequestAnimationFrame(function() { | |
| 248 chrome.send('loginVisible'); | |
| 249 }); | |
| 250 } | 249 } |
| 251 this.currentStep_ = nextStepIndex; | 250 this.currentStep_ = nextStepIndex; |
| 252 $('oobe').className = nextStepId; | 251 $('oobe').className = nextStepId; |
| 253 | 252 |
| 254 $('step-logo').hidden = newStep.classList.contains('no-logo'); | 253 $('step-logo').hidden = newStep.classList.contains('no-logo'); |
| 255 }, | 254 }, |
| 256 | 255 |
| 257 /** | 256 /** |
| 258 * Show screen of given screen id. | 257 * Show screen of given screen id. |
| 259 * @param {Object} screen Screen params dict, | 258 * @param {Object} screen Screen params dict, |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 $('add-user-button').disabled = disable; | 564 $('add-user-button').disabled = disable; |
| 566 $('add-user-button').title = disable ? | 565 $('add-user-button').title = disable ? |
| 567 localStrings.getString('disabledAddUserTooltip') : ''; | 566 localStrings.getString('disabledAddUserTooltip') : ''; |
| 568 } | 567 } |
| 569 | 568 |
| 570 // Export | 569 // Export |
| 571 return { | 570 return { |
| 572 DisplayManager: DisplayManager | 571 DisplayManager: DisplayManager |
| 573 }; | 572 }; |
| 574 }); | 573 }); |
| OLD | NEW |