| 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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 }; | 912 }; |
| 913 | 913 |
| 914 /** | 914 /** |
| 915 * Resets sign-in input fields. | 915 * Resets sign-in input fields. |
| 916 * @param {boolean} forceOnline Whether online sign-in should be forced. | 916 * @param {boolean} forceOnline Whether online sign-in should be forced. |
| 917 * If |forceOnline| is false previously used sign-in type will be used. | 917 * If |forceOnline| is false previously used sign-in type will be used. |
| 918 */ | 918 */ |
| 919 DisplayManager.resetSigninUI = function(forceOnline) { | 919 DisplayManager.resetSigninUI = function(forceOnline) { |
| 920 var currentScreenId = Oobe.getInstance().currentScreen.id; | 920 var currentScreenId = Oobe.getInstance().currentScreen.id; |
| 921 | 921 |
| 922 $(SCREEN_GAIA_SIGNIN).reset( | 922 if ($(SCREEN_GAIA_SIGNIN)) |
| 923 currentScreenId == SCREEN_GAIA_SIGNIN, forceOnline); | 923 $(SCREEN_GAIA_SIGNIN).reset( |
| 924 currentScreenId == SCREEN_GAIA_SIGNIN, forceOnline); |
| 924 $('login-header-bar').disabled = false; | 925 $('login-header-bar').disabled = false; |
| 925 $('pod-row').reset(currentScreenId == SCREEN_ACCOUNT_PICKER); | 926 $('pod-row').reset(currentScreenId == SCREEN_ACCOUNT_PICKER); |
| 926 }; | 927 }; |
| 927 | 928 |
| 928 /** | 929 /** |
| 929 * Shows sign-in error bubble. | 930 * Shows sign-in error bubble. |
| 930 * @param {number} loginAttempts Number of login attemps tried. | 931 * @param {number} loginAttempts Number of login attemps tried. |
| 931 * @param {string} message Error message to show. | 932 * @param {string} message Error message to show. |
| 932 * @param {string} link Text to use for help link. | 933 * @param {string} link Text to use for help link. |
| 933 * @param {number} helpId Help topic Id associated with help link. | 934 * @param {number} helpId Help topic Id associated with help link. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 */ | 1044 */ |
| 1044 DisplayManager.refocusCurrentPod = function() { | 1045 DisplayManager.refocusCurrentPod = function() { |
| 1045 $('pod-row').refocusCurrentPod(); | 1046 $('pod-row').refocusCurrentPod(); |
| 1046 }; | 1047 }; |
| 1047 | 1048 |
| 1048 // Export | 1049 // Export |
| 1049 return { | 1050 return { |
| 1050 DisplayManager: DisplayManager | 1051 DisplayManager: DisplayManager |
| 1051 }; | 1052 }; |
| 1052 }); | 1053 }); |
| OLD | NEW |