| OLD | NEW |
| 1 // Copyright (c) 2016 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_shared.js"> | 9 <include src="login_shared.js"> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 initialize: function() { | 59 initialize: function() { |
| 60 cr.ui.login.DisplayManager.initialize(); | 60 cr.ui.login.DisplayManager.initialize(); |
| 61 login.AccountPickerScreen.register(); | 61 login.AccountPickerScreen.register(); |
| 62 | 62 |
| 63 cr.ui.Bubble.decorate($('bubble')); | 63 cr.ui.Bubble.decorate($('bubble')); |
| 64 login.HeaderBar.decorate($('login-header-bar')); | 64 login.HeaderBar.decorate($('login-header-bar')); |
| 65 | 65 |
| 66 chrome.send('screenStateInitialize'); | 66 chrome.send('screenStateInitialize'); |
| 67 }, | 67 }, |
| 68 | 68 |
| 69 /** |
| 70 * Notification from the host that the PIN keyboard will be used in the |
| 71 * lock session so it should also get preloaded. |
| 72 */ |
| 73 preloadPinKeyboard: function() { |
| 74 showPinKeyboardAsync(); |
| 75 }, |
| 76 |
| 77 /** |
| 78 * Called when a preloaded webview (this) instance is being reused to |
| 79 * display a new lock screen session. This will also be called when a |
| 80 * lock screen has been preloaded and is being displayed for the first |
| 81 * time. |
| 82 */ |
| 83 reload: function() { |
| 84 // Sending accountPickerReady displays the webui. Wait for the next |
| 85 // animation frame so the user does not see any state from the previous |
| 86 // instance. |
| 87 requestAnimationFrame(function() { |
| 88 chrome.send('accountPickerReady'); |
| 89 }); |
| 90 }, |
| 91 |
| 92 /** |
| 93 * Called when the lock screen has been dismissed but this webview will stay |
| 94 * in memory. The webview will be reused when Oobe.reload() is called. |
| 95 */ |
| 96 teardown: function() { |
| 97 // The PIN keyboard will disable the virtual keyboard. Make sure to |
| 98 // revert the force disable when hiding the lock screen. |
| 99 chrome.send('setForceDisableVirtualKeyboard', [false]); |
| 100 }, |
| 101 |
| 69 // Dummy Oobe functions not present with stripped login UI. | 102 // Dummy Oobe functions not present with stripped login UI. |
| 70 initializeA11yMenu: function(e) {}, | 103 initializeA11yMenu: function(e) {}, |
| 71 handleAccessibilityLinkClick: function(e) {}, | 104 handleAccessibilityLinkClick: function(e) {}, |
| 72 handleSpokenFeedbackClick: function(e) {}, | 105 handleSpokenFeedbackClick: function(e) {}, |
| 73 handleHighContrastClick: function(e) {}, | 106 handleHighContrastClick: function(e) {}, |
| 74 handleScreenMagnifierClick: function(e) {}, | 107 handleScreenMagnifierClick: function(e) {}, |
| 75 setUsageStats: function(checked) {}, | 108 setUsageStats: function(checked) {}, |
| 76 setOemEulaUrl: function(oemEulaUrl) {}, | 109 setOemEulaUrl: function(oemEulaUrl) {}, |
| 77 setTpmPassword: function(password) {}, | 110 setTpmPassword: function(password) {}, |
| 78 refreshA11yInfo: function(data) {}, | 111 refreshA11yInfo: function(data) {}, |
| 79 | 112 |
| 80 /** | 113 /** |
| 81 * Reloads content of the page. | 114 * Reloads content of the page. |
| 82 * @param {!Object} data New dictionary with i18n values. | 115 * @param {!Object} data New dictionary with i18n values. |
| 83 */ | 116 */ |
| 84 reloadContent: function(data) { | 117 reloadContent: function(data) { |
| 85 loadTimeData.overrideValues(data); | 118 loadTimeData.overrideValues(data); |
| 86 i18nTemplate.process(document, loadTimeData); | 119 i18nTemplate.process(document, loadTimeData); |
| 87 Oobe.getInstance().updateLocalizedContent_(); | 120 Oobe.getInstance().updateLocalizedContent_(); |
| 88 }, | 121 }, |
| 89 }; | 122 }; |
| 90 }); | 123 }); |
| OLD | NEW |