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

Unified Diff: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.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: review + SetZeroDelays in tests Created 8 years, 5 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/background/ash_user_wallpaper_delegate.cc
diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
index 96be6ec9f1848d0846356074080467c9fdd5bdd9..39a070006dc97f8f928d99f0c0d7233b9437aa41 100644
--- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
+++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
@@ -25,24 +25,30 @@ namespace chromeos {
namespace {
-class UserWallpaperDelegate: public ash::UserWallpaperDelegate {
+class UserWallpaperDelegate : public ash::UserWallpaperDelegate {
public:
- UserWallpaperDelegate() {
+ UserWallpaperDelegate() : boot_animation_finished_(false) {
}
virtual ~UserWallpaperDelegate() {
}
virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (chromeos::UserManager::Get()->IsUserLoggedIn() ||
Ben Goodger (Google) 2012/08/02 15:38:39 It's becoming hard to discern the intent of this f
Nikita (slow) 2012/08/02 17:58:57 Done.
+ boot_animation_finished_ ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableNewOobe) ||
- WizardController::IsZeroDelayEnabled()) {
+ WizardController::IsZeroDelayEnabled() ||
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kLoginManager)) {
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
}
bool is_registered = WizardController::IsDeviceRegistered();
- // TODO(nkostylev): Figure out whether this would affect autotests as well.
- if (is_registered)
+ bool disable_boot_animation =
+ CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBootAnimation);
+ if (is_registered && disable_boot_animation)
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
else
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE;
Ben Goodger (Google) 2012/08/02 15:38:39 no else after return.
Nikita (slow) 2012/08/02 17:58:57 Done.
@@ -67,7 +73,14 @@ class UserWallpaperDelegate: public ash::UserWallpaperDelegate {
content::NotificationService::NoDetails());
}
+ virtual void OnWallpaperBootAnimationFinished() OVERRIDE {
+ // Make sure that boot animation type is used only once.
+ boot_animation_finished_ = true;
+ }
+
private:
+ bool boot_animation_finished_;
+
DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698