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

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

Issue 10889024: [cros] Initialize OOBE in parallel when boot animation is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Subscription fixes Created 8 years, 4 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
Index: chrome/browser/resources/chromeos/login/user_pod_row.js
diff --git a/chrome/browser/resources/chromeos/login/user_pod_row.js b/chrome/browser/resources/chromeos/login/user_pod_row.js
index 6fe75fe314a8c4d320f72361aea0ad56ade3a55f..af90efafc8125a81d0596b39d6393226ece07335 100644
--- a/chrome/browser/resources/chromeos/login/user_pod_row.js
+++ b/chrome/browser/resources/chromeos/login/user_pod_row.js
@@ -33,7 +33,7 @@ cr.define('login', function() {
* @type {number}
* @const
*/
- var WALLPAPER_BOOT_LOAD_DELAY_MS = 500;
+ var WALLPAPER_BOOT_LOAD_DELAY_MS = 100;
/**
* Maximum time for which the pod row remains hidden until all user images
@@ -451,6 +451,10 @@ cr.define('login', function() {
// Whether this user pod row is shown for the first time.
firstShown_: true,
+ // Whether the initial wallpaper load after boot has been requested. Used
+ // only if |Oobe.getInstance().shouldLoadWallpaperOnBoot()| is true.
+ bootWallpaperLoaded_: false,
+
// True if inside focusPod().
insideFocusPod_: false,
@@ -694,21 +698,11 @@ cr.define('login', function() {
// Delay wallpaper loading to let user tab through pods without lag.
this.loadWallpaperTimeout_ = window.setTimeout(
this.loadWallpaper_.bind(this), WALLPAPER_LOAD_DELAY_MS);
- } else {
- if (!this.firstShown_) {
- // Load wallpaper immediately if there no pod was focused
- // previously, and it is not a boot into user pod list case.
- this.loadWallpaper_();
- } else {
- // Boot transition. Delay wallpaper load to remove jank
- // happening when wallpaper load is competing for resources with
- // login WebUI.
- if (Oobe.getInstance().shouldLoadWallpaperOnBoot()) {
- this.loadWallpaperTimeout_ = window.setTimeout(
- this.loadWallpaper_.bind(this), WALLPAPER_BOOT_LOAD_DELAY_MS);
- }
- this.firstShown_ = false;
- }
+ } else if (!this.firstShown_) {
+ // Load wallpaper immediately if there no pod was focused
+ // previously, and it is not a boot into user pod list case.
+ this.loadWallpaper_();
+ this.firstShown_ = false;
}
} else {
chrome.send('userDeselected');
@@ -893,12 +887,20 @@ cr.define('login', function() {
if (this.focusedPod_) {
var focusedPod = this.focusedPod_;
var screen = this.parentNode;
+ var self = this;
focusedPod.addEventListener('webkitTransitionEnd', function f(e) {
if (e.target == focusedPod) {
focusedPod.removeEventListener('webkitTransitionEnd', f);
focusedPod.reset(true);
// Notify screen that it is ready.
screen.onShow();
+ // Boot transition: load wallpaper.
+ if (!self.bootWallpaperLoaded_ &&
+ Oobe.getInstance().shouldLoadWallpaperOnBoot()) {
+ self.loadWallpaperTimeout_ = window.setTimeout(
+ self.loadWallpaper_.bind(self), WALLPAPER_BOOT_LOAD_DELAY_MS);
+ self.bootWallpaperLoaded_ = true;
+ }
}
});
}
@@ -941,10 +943,6 @@ cr.define('login', function() {
if (this.podsWithPendingImages_.length == 0) {
this.classList.remove('images-loading');
chrome.send('userImagesLoaded');
- // Report back user pods being painted.
- window.webkitRequestAnimationFrame(function() {
- chrome.send('loginVisible');
- });
}
}
};

Powered by Google App Engine
This is Rietveld 408576698