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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.cc

Issue 10834081: Enable wallpaper boot animation for boot into sign in too. Add flag to disable it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: merge 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/chromeos/login/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 8fa5b66af363c8760647cd40a4958ec46ef7b29c..b0e59a88a19350c7b4fb479062761fb4b76eed06 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -198,13 +198,18 @@ void WallpaperManager::InitializeWallpaper() {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType))
WizardController::SetZeroDelays();
+ // Zero delays is also set in autotests.
+ if (WizardController::IsZeroDelayEnabled())
+ return;
+
+ bool disable_new_oobe = CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableNewOobe);
+ bool disable_boot_animation = CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBootAnimation);
+
if (!user_manager->IsUserLoggedIn()) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableNewOobe)) {
- if (!WizardController::IsDeviceRegistered() &&
- !WizardController::IsZeroDelayEnabled()) {
- // TODO(nkostylev): Add switch to disable wallpaper transition on OOBE.
- // Should be used on test images so that they are not slowed down.
+ if (!disable_new_oobe) {
+ if (!WizardController::IsDeviceRegistered()) {
ash::Shell::GetInstance()->desktop_background_controller()->
SetDefaultWallpaper(kDefaultOOBEWallpaperIndex, false);
} else {
@@ -214,8 +219,20 @@ void WallpaperManager::InitializeWallpaper() {
DCHECK(result) << "Unable to fetch setting "
<< kAccountsPrefShowUserNamesOnSignIn;
if (!show_users) {
+ // Boot into sign in form, preload default wallpaper.
ash::Shell::GetInstance()->desktop_background_controller()->
- SetDefaultWallpaper(ash::GetSolidColorIndex(), false);
+ SetDefaultWallpaper(kDefaultOOBEWallpaperIndex, false);
+ } else if (!disable_boot_animation) {
+ // Normal boot, load user wallpaper.
+ // If normal boot animation is disabled wallpaper would be set
+ // asynchronously once user pods are loaded.
+ const chromeos::UserList& users = user_manager->GetUsers();
+ if (!users.empty()) {
+ SetUserWallpaper(users[0]->email());
+ } else {
+ ash::Shell::GetInstance()->desktop_background_controller()->
+ SetDefaultWallpaper(kDefaultOOBEWallpaperIndex, false);
+ }
}
}
}
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/login/webui_login_display_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698