| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 innerContainer.removeEventListener('webkitTransitionEnd', f); | 252 innerContainer.removeEventListener('webkitTransitionEnd', f); |
| 253 $('progress-dots').classList.remove('down'); | 253 $('progress-dots').classList.remove('down'); |
| 254 chrome.send('loginVisible', ['oobe']); | 254 chrome.send('loginVisible', ['oobe']); |
| 255 }); | 255 }); |
| 256 } | 256 } |
| 257 newHeader.classList.remove('right'); // Old OOBE. | 257 newHeader.classList.remove('right'); // Old OOBE. |
| 258 } | 258 } |
| 259 this.currentStep_ = nextStepIndex; | 259 this.currentStep_ = nextStepIndex; |
| 260 $('oobe').className = nextStepId; | 260 $('oobe').className = nextStepId; |
| 261 | 261 |
| 262 // Focus the default control (if specified). |
| 263 var defaultControl = newStep.defaultControl; |
| 264 if (defaultControl) |
| 265 defaultControl.focus(); |
| 266 |
| 262 $('step-logo').hidden = newStep.classList.contains('no-logo'); | 267 $('step-logo').hidden = newStep.classList.contains('no-logo'); |
| 263 | 268 |
| 264 chrome.send('updateCurrentScreen', [this.currentScreen.id]); | 269 chrome.send('updateCurrentScreen', [this.currentScreen.id]); |
| 265 }, | 270 }, |
| 266 | 271 |
| 267 /** | 272 /** |
| 268 * Make sure that screen is initialized and decorated. | 273 * Make sure that screen is initialized and decorated. |
| 269 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: {}}. | 274 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: {}}. |
| 270 */ | 275 */ |
| 271 preloadScreen: function(screen) { | 276 preloadScreen: function(screen) { |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 $('add-user-button').classList.add('button-restricted'); | 607 $('add-user-button').classList.add('button-restricted'); |
| 603 $('add-user-button').title = disable ? | 608 $('add-user-button').title = disable ? |
| 604 localStrings.getString('disabledAddUserTooltip') : ''; | 609 localStrings.getString('disabledAddUserTooltip') : ''; |
| 605 } | 610 } |
| 606 | 611 |
| 607 // Export | 612 // Export |
| 608 return { | 613 return { |
| 609 DisplayManager: DisplayManager | 614 DisplayManager: DisplayManager |
| 610 }; | 615 }; |
| 611 }); | 616 }); |
| OLD | NEW |