OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 Login UI based on a stripped down OOBE controller. | 6 * @fileoverview Login UI based on a stripped down OOBE controller. |
7 */ | 7 */ |
8 | 8 |
9 <include src="login_common.js"> | 9 <include src="login_shared.js"> |
10 <include src="notification_card.js"> | |
11 | 10 |
12 cr.define('cr.ui.Oobe', function() { | 11 cr.define('cr.ui.Oobe', function() { |
13 return { | 12 return { |
14 /** | 13 /** |
15 * Initializes the OOBE flow. This will cause all C++ handlers to | 14 * Initializes the OOBE flow. This will cause all C++ handlers to |
16 * be invoked to do final setup. | 15 * be invoked to do final setup. |
17 */ | 16 */ |
18 initialize: function() { | 17 initialize: function() { |
19 // TODO(jdufault): Remove this after resolving crbug.com/452599. | 18 // TODO(jdufault): Remove this after resolving crbug.com/452599. |
20 console.log('Initializing OOBE'); | 19 console.log('Start initializing LOCK OOBE'); |
21 | 20 |
22 cr.ui.login.DisplayManager.initialize(); | 21 cr.ui.login.DisplayManager.initialize(); |
23 login.WrongHWIDScreen.register(); | |
24 login.AccountPickerScreen.register(); | 22 login.AccountPickerScreen.register(); |
25 login.GaiaSigninScreen.register(); | |
26 login.UserImageScreen.register(/* lazyInit= */ true); | |
27 login.ResetScreen.register(); | |
28 login.AutolaunchScreen.register(); | |
29 login.KioskEnableScreen.register(); | |
30 login.ErrorMessageScreen.register(); | |
31 login.TPMErrorMessageScreen.register(); | |
32 login.PasswordChangedScreen.register(); | |
33 login.SupervisedUserCreationScreen.register(); | |
34 login.TermsOfServiceScreen.register(); | |
35 login.AppLaunchSplashScreen.register(); | |
36 login.ConfirmPasswordScreen.register(); | |
37 login.FatalErrorScreen.register(); | |
38 login.DeviceDisabledScreen.register(); | |
39 login.UnrecoverableCryptohomeErrorScreen.register(); | |
40 | 23 |
41 cr.ui.Bubble.decorate($('bubble')); | 24 cr.ui.Bubble.decorate($('bubble')); |
42 login.HeaderBar.decorate($('login-header-bar')); | 25 login.HeaderBar.decorate($('login-header-bar')); |
43 | 26 |
44 chrome.send('screenStateInitialize'); | 27 chrome.send('screenStateInitialize'); |
45 }, | 28 }, |
46 | 29 |
47 // Dummy Oobe functions not present with stripped login UI. | 30 // Dummy Oobe functions not present with stripped login UI. |
48 initializeA11yMenu: function(e) {}, | 31 initializeA11yMenu: function(e) {}, |
49 handleAccessibilityLinkClick: function(e) {}, | 32 handleAccessibilityLinkClick: function(e) {}, |
50 handleSpokenFeedbackClick: function(e) {}, | 33 handleSpokenFeedbackClick: function(e) {}, |
51 handleHighContrastClick: function(e) {}, | 34 handleHighContrastClick: function(e) {}, |
52 handleScreenMagnifierClick: function(e) {}, | 35 handleScreenMagnifierClick: function(e) {}, |
53 setUsageStats: function(checked) {}, | 36 setUsageStats: function(checked) {}, |
54 setOemEulaUrl: function(oemEulaUrl) {}, | 37 setOemEulaUrl: function(oemEulaUrl) {}, |
55 setTpmPassword: function(password) {}, | 38 setTpmPassword: function(password) {}, |
56 refreshA11yInfo: function(data) {}, | 39 refreshA11yInfo: function(data) {}, |
57 | 40 |
58 /** | 41 /** |
59 * Reloads content of the page. | 42 * Reloads content of the page. |
60 * @param {!Object} data New dictionary with i18n values. | 43 * @param {!Object} data New dictionary with i18n values. |
61 */ | 44 */ |
62 reloadContent: function(data) { | 45 reloadContent: function(data) { |
63 loadTimeData.overrideValues(data); | 46 loadTimeData.overrideValues(data); |
64 i18nTemplate.process(document, loadTimeData); | 47 i18nTemplate.process(document, loadTimeData); |
65 Oobe.getInstance().updateLocalizedContent_(); | 48 Oobe.getInstance().updateLocalizedContent_(); |
66 }, | 49 }, |
67 }; | 50 }; |
68 }); | 51 }); |
OLD | NEW |