Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/lock.js |
| diff --git a/chrome/browser/resources/chromeos/login/lock.js b/chrome/browser/resources/chromeos/login/lock.js |
| index ad5919ce956cc5801e881bee324b882ccd243731..3325755e99d559d2d5edad85a2caf71f03deb0f5 100644 |
| --- a/chrome/browser/resources/chromeos/login/lock.js |
| +++ b/chrome/browser/resources/chromeos/login/lock.js |
| @@ -66,6 +66,39 @@ cr.define('cr.ui.Oobe', function() { |
| chrome.send('screenStateInitialize'); |
| }, |
| + /** |
| + * Notification from the host that the PIN keyboard will be used in the |
| + * lock session so it should also get preloaded. |
| + */ |
| + preloadPin: function() { |
|
Alexander Alekseev
2016/12/10 01:26:49
nit: rename to preloadPinKeyboard
jdufault
2016/12/12 19:52:02
Done.
|
| + showPinKeyboardAsync(); |
| + }, |
| + |
| + /** |
| + * Called when a preloaded webview (this) instance is being reused to |
| + * display a new lock screen session. This will also be called when a |
| + * lock screen has been preloaded and is being displayed for the first |
| + * time. |
| + */ |
| + reload: function() { |
| + // Sending accountPickerReady displays the webui. Wait for the next |
| + // animation frame so the user does not see any state from the previous |
| + // instance. |
| + requestAnimationFrame(function() { |
| + chrome.send('accountPickerReady'); |
| + }); |
| + }, |
| + |
| + /** |
| + * Called when the lock screen has been dismissed but this webview will stay |
| + * in memory. The webview will be reused when Oobe.reload() is called. |
| + */ |
| + teardown: function() { |
| + // The PIN keyboard will disable the virtual keyboard. Make sure to |
| + // revert the force disable when hiding the lock screen. |
| + chrome.send('setForceDisableVirtualKeyboard', [false]); |
| + }, |
| + |
| // Dummy Oobe functions not present with stripped login UI. |
| initializeA11yMenu: function(e) {}, |
| handleAccessibilityLinkClick: function(e) {}, |