Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: chrome/browser/resources/chromeos/login/lock.js

Issue 2555453003: cros: HTML fixes needed to reinitializing an existing lock WebUI. (Closed)
Patch Set: Initial upload Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {},

Powered by Google App Engine
This is Rietveld 408576698