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