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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 oldStep.removeEventListener('webkitTransitionEnd', f); | 187 oldStep.removeEventListener('webkitTransitionEnd', f); |
188 if (oldStep.classList.contains('faded') || | 188 if (oldStep.classList.contains('faded') || |
189 oldStep.classList.contains('left') || | 189 oldStep.classList.contains('left') || |
190 oldStep.classList.contains('right')) { | 190 oldStep.classList.contains('right')) { |
191 oldStep.classList.add('hidden'); | 191 oldStep.classList.add('hidden'); |
192 } | 192 } |
193 }); | 193 }); |
194 } else { | 194 } else { |
195 // First screen on OOBE launch. | 195 // First screen on OOBE launch. |
196 newHeader.classList.remove('right'); | 196 newHeader.classList.remove('right'); |
| 197 // Report back first OOBE screen being painted. |
| 198 window.webkitRequestAnimationFrame(function() { |
| 199 chrome.send('loginVisible'); |
| 200 }); |
197 } | 201 } |
198 this.currentStep_ = nextStepIndex; | 202 this.currentStep_ = nextStepIndex; |
199 $('oobe').className = nextStepId; | 203 $('oobe').className = nextStepId; |
200 }, | 204 }, |
201 | 205 |
202 /** | 206 /** |
203 * Show screen of given screen id. | 207 * Show screen of given screen id. |
204 * @param {Object} screen Screen params dict, | 208 * @param {Object} screen Screen params dict, |
205 * e.g. {id: screenId, data: data}. | 209 * e.g. {id: screenId, data: data}. |
206 */ | 210 */ |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 }); | 441 }); |
438 } | 442 } |
439 } | 443 } |
440 }; | 444 }; |
441 | 445 |
442 // Export | 446 // Export |
443 return { | 447 return { |
444 DisplayManager: DisplayManager | 448 DisplayManager: DisplayManager |
445 }; | 449 }; |
446 }); | 450 }); |
OLD | NEW |