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
3 // found in the LICENSE file.
6 * @fileoverview Login UI based on a stripped down OOBE controller.
9 <include src
="login_common.js">
11 cr
.define('cr.ui.Oobe', function() {
14 * Initializes the OOBE flow. This will cause all C++ handlers to
15 * be invoked to do final setup.
17 initialize: function() {
18 cr
.ui
.login
.DisplayManager
.initialize();
19 login
.WrongHWIDScreen
.register();
20 login
.AccountPickerScreen
.register();
21 login
.GaiaSigninScreen
.register();
22 login
.UserImageScreen
.register(/* lazyInit= */ true);
23 login
.ResetScreen
.register();
24 login
.AutolaunchScreen
.register();
25 login
.KioskEnableScreen
.register();
26 login
.ErrorMessageScreen
.register();
27 login
.TPMErrorMessageScreen
.register();
28 login
.PasswordChangedScreen
.register();
29 login
.SupervisedUserCreationScreen
.register();
30 login
.TermsOfServiceScreen
.register();
31 login
.AppLaunchSplashScreen
.register();
32 login
.ConfirmPasswordScreen
.register();
33 login
.FatalErrorScreen
.register();
34 login
.DeviceDisabledScreen
.register();
36 cr
.ui
.Bubble
.decorate($('bubble'));
37 login
.HeaderBar
.decorate($('login-header-bar'));
39 chrome
.send('screenStateInitialize');
42 // Dummy Oobe functions not present with stripped login UI.
43 initializeA11yMenu: function(e
) {},
44 handleAccessibilityLinkClick: function(e
) {},
45 handleSpokenFeedbackClick: function(e
) {},
46 handleHighContrastClick: function(e
) {},
47 handleScreenMagnifierClick: function(e
) {},
48 setUsageStats: function(checked
) {},
49 setOemEulaUrl: function(oemEulaUrl
) {},
50 setTpmPassword: function(password
) {},
51 refreshA11yInfo: function(data
) {},
54 * Reloads content of the page.
55 * @param {!Object} data New dictionary with i18n values.
57 reloadContent: function(data
) {
58 loadTimeData
.overrideValues(data
);
59 i18nTemplate
.process(document
, loadTimeData
);
60 Oobe
.getInstance().updateLocalizedContent_();