| OLD | NEW |
| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 } else { | 565 } else { |
| 566 if (defaultControl) | 566 if (defaultControl) |
| 567 defaultControl.focus(); | 567 defaultControl.focus(); |
| 568 chrome.send('loginVisible', ['oobe']); | 568 chrome.send('loginVisible', ['oobe']); |
| 569 } | 569 } |
| 570 } | 570 } |
| 571 this.currentStep_ = nextStepIndex; | 571 this.currentStep_ = nextStepIndex; |
| 572 | 572 |
| 573 $('step-logo').hidden = newStep.classList.contains('no-logo'); | 573 $('step-logo').hidden = newStep.classList.contains('no-logo'); |
| 574 | 574 |
| 575 $('oobe').dispatchEvent( |
| 576 new CustomEvent('screenchanged', |
| 577 {detail: this.currentScreen.id})); |
| 575 chrome.send('updateCurrentScreen', [this.currentScreen.id]); | 578 chrome.send('updateCurrentScreen', [this.currentScreen.id]); |
| 576 }, | 579 }, |
| 577 | 580 |
| 578 /** | 581 /** |
| 579 * Make sure that screen is initialized and decorated. | 582 * Make sure that screen is initialized and decorated. |
| 580 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: {}}. | 583 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: {}}. |
| 581 */ | 584 */ |
| 582 preloadScreen: function(screen) { | 585 preloadScreen: function(screen) { |
| 583 var screenEl = $(screen.id); | 586 var screenEl = $(screen.id); |
| 584 if (screenEl.deferredInitialization !== undefined) { | 587 if (screenEl.deferredInitialization !== undefined) { |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 */ | 1047 */ |
| 1045 DisplayManager.refocusCurrentPod = function() { | 1048 DisplayManager.refocusCurrentPod = function() { |
| 1046 $('pod-row').refocusCurrentPod(); | 1049 $('pod-row').refocusCurrentPod(); |
| 1047 }; | 1050 }; |
| 1048 | 1051 |
| 1049 // Export | 1052 // Export |
| 1050 return { | 1053 return { |
| 1051 DisplayManager: DisplayManager | 1054 DisplayManager: DisplayManager |
| 1052 }; | 1055 }; |
| 1053 }); | 1056 }); |
| OLD | NEW |