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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 oldStep.removeEventListener('webkitTransitionEnd', f); | 180 oldStep.removeEventListener('webkitTransitionEnd', f); |
181 if (oldStep.classList.contains('faded') || | 181 if (oldStep.classList.contains('faded') || |
182 oldStep.classList.contains('left') || | 182 oldStep.classList.contains('left') || |
183 oldStep.classList.contains('right')) { | 183 oldStep.classList.contains('right')) { |
184 oldStep.classList.add('hidden'); | 184 oldStep.classList.add('hidden'); |
185 } | 185 } |
186 }); | 186 }); |
187 } else { | 187 } else { |
188 // First screen on OOBE launch. | 188 // First screen on OOBE launch. |
189 newHeader.classList.remove('right'); | 189 newHeader.classList.remove('right'); |
| 190 // Report back first OOBE screen being painted. |
| 191 window.webkitRequestAnimationFrame(function() { |
| 192 chrome.send('loginVisible'); |
| 193 }); |
190 } | 194 } |
191 this.currentStep_ = nextStepIndex; | 195 this.currentStep_ = nextStepIndex; |
192 $('oobe').className = nextStepId; | 196 $('oobe').className = nextStepId; |
193 }, | 197 }, |
194 | 198 |
195 /** | 199 /** |
196 * Show screen of given screen id. | 200 * Show screen of given screen id. |
197 * @param {Object} screen Screen params dict, | 201 * @param {Object} screen Screen params dict, |
198 * e.g. {id: screenId, data: data}. | 202 * e.g. {id: screenId, data: data}. |
199 */ | 203 */ |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 }); | 427 }); |
424 } | 428 } |
425 } | 429 } |
426 }; | 430 }; |
427 | 431 |
428 // Export | 432 // Export |
429 return { | 433 return { |
430 DisplayManager: DisplayManager | 434 DisplayManager: DisplayManager |
431 }; | 435 }; |
432 }); | 436 }); |
OLD | NEW |