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})); | |
578 chrome.send('updateCurrentScreen', [this.currentScreen.id]); | 575 chrome.send('updateCurrentScreen', [this.currentScreen.id]); |
579 }, | 576 }, |
580 | 577 |
581 /** | 578 /** |
582 * Make sure that screen is initialized and decorated. | 579 * Make sure that screen is initialized and decorated. |
583 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: {}}. | 580 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: {}}. |
584 */ | 581 */ |
585 preloadScreen: function(screen) { | 582 preloadScreen: function(screen) { |
586 var screenEl = $(screen.id); | 583 var screenEl = $(screen.id); |
587 if (screenEl.deferredInitialization !== undefined) { | 584 if (screenEl.deferredInitialization !== undefined) { |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 */ | 1044 */ |
1048 DisplayManager.refocusCurrentPod = function() { | 1045 DisplayManager.refocusCurrentPod = function() { |
1049 $('pod-row').refocusCurrentPod(); | 1046 $('pod-row').refocusCurrentPod(); |
1050 }; | 1047 }; |
1051 | 1048 |
1052 // Export | 1049 // Export |
1053 return { | 1050 return { |
1054 DisplayManager: DisplayManager | 1051 DisplayManager: DisplayManager |
1055 }; | 1052 }; |
1056 }); | 1053 }); |
OLD | NEW |