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

Unified Diff: chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js

Issue 2691943005: fix quick unlock config in options (Closed)
Patch Set: incorporate comments Created 3 years, 10 months 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/i18n_setup.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
diff --git a/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js b/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
index 2cf087de38d83b60bcdb0432931189f7203ecbef..01245685654cb1b48588833c250c205f11979541 100644
--- a/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
+++ b/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
@@ -7,6 +7,14 @@ cr.define('options', function() {
var PageManager = cr.ui.pageManager.PageManager;
/**
+ * Maximum time to wait after the page is fully loaded before we start to
+ * load polymer elements.
+ * @type {number}
+ * @const
+ */
+ var POLYMER_LOAD_TIMEOUT_MS = 5000;
+
+ /**
* QuickUnlockConfigureOverlay class
* Dialog that allows users to configure screen lock.
* @constructor
@@ -30,6 +38,14 @@ cr.define('options', function() {
$('screen-lock-done').onclick = function() {
QuickUnlockConfigureOverlay.dismiss();
};
+
+ window.addEventListener('load', function() {
+ // Setting a timeout here to avoid racing with some browsertests,
+ // this should be here for only a short period of time as
+ // md-settings are launching soon.
+ setTimeout(
+ this.ensurePolymerIsLoaded_.bind(this), POLYMER_LOAD_TIMEOUT_MS);
+ }.bind(this));
},
/** @override */
« no previous file with comments | « no previous file | chrome/browser/resources/options/i18n_setup.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698