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 Oobe signin screen implementation. | 6 * @fileoverview Oobe signin screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { | 9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
10 // Gaia loading time after which error message must be displayed and | 10 // Gaia loading time after which error message must be displayed and |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 }, | 926 }, |
927 | 927 |
928 /** | 928 /** |
929 * Sets welcome and enterpriseinfo strings for offline gaia. | 929 * Sets welcome and enterpriseinfo strings for offline gaia. |
930 * Also sets callback and sends message whether we already have email and | 930 * Also sets callback and sends message whether we already have email and |
931 * should switch to the password screen with error. | 931 * should switch to the password screen with error. |
932 */ | 932 */ |
933 loadOffline: function(params) { | 933 loadOffline: function(params) { |
934 var offlineLogin = $('offline-gaia'); | 934 var offlineLogin = $('offline-gaia'); |
935 var strings = params.localizedStrings; | 935 var strings = params.localizedStrings; |
936 offlineLogin.enterpriseInfo = strings['stringEnterpriseInfo']; | 936 if ('stringEnterpriseInfo' in strings) |
| 937 offlineLogin.enterpriseInfo = strings['stringEnterpriseInfo']; |
| 938 if ('emailDomain' in params) |
| 939 offlineLogin.emailDomain = '@' + params['emailDomain']; |
937 offlineLogin.setEmail(params.email); | 940 offlineLogin.setEmail(params.email); |
938 }, | 941 }, |
939 | 942 |
940 /** | 943 /** |
941 * Show/Hide error when user is not in whitelist. When UI is hidden | 944 * Show/Hide error when user is not in whitelist. When UI is hidden |
942 * GAIA is reloaded. | 945 * GAIA is reloaded. |
943 * @param {boolean} show Show/hide error UI. | 946 * @param {boolean} show Show/hide error UI. |
944 * @param {!Object} opt_data Optional additional information. | 947 * @param {!Object} opt_data Optional additional information. |
945 */ | 948 */ |
946 showWhitelistCheckFailedError: function(show, opt_data) { | 949 showWhitelistCheckFailedError: function(show, opt_data) { |
(...skipping 17 matching lines...) Expand all Loading... |
964 */ | 967 */ |
965 updateDeviceId: function(data) { | 968 updateDeviceId: function(data) { |
966 if (!this.isNewGaiaFlow) | 969 if (!this.isNewGaiaFlow) |
967 return; | 970 return; |
968 | 971 |
969 if (data && data.deviceId) | 972 if (data && data.deviceId) |
970 this.gaiaAuthHost_.updateDeviceId(data.deviceId); | 973 this.gaiaAuthHost_.updateDeviceId(data.deviceId); |
971 }, | 974 }, |
972 }; | 975 }; |
973 }); | 976 }); |
OLD | NEW |