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..67446928224238f589009c3b2734824055066180 100644 |
--- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc |
+++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc |
@@ -27,14 +27,16 @@ namespace { |
class UserWallpaperDelegate: public ash::UserWallpaperDelegate { |
Ivan Korotkov
2012/07/31 22:20:26
space before :
Nikita (slow)
2012/08/01 02:09:06
Done.
|
public: |
- UserWallpaperDelegate() { |
+ UserWallpaperDelegate() : boot_animation_finished_(false) { |
} |
virtual ~UserWallpaperDelegate() { |
} |
virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE { |
- if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ if (chromeos::UserManager::Get()->IsUserLoggedIn() || |
+ boot_animation_finished_ || |
+ CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kDisableNewOobe) || |
WizardController::IsZeroDelayEnabled()) { |
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
@@ -42,7 +44,10 @@ class UserWallpaperDelegate: public ash::UserWallpaperDelegate { |
bool is_registered = WizardController::IsDeviceRegistered(); |
// TODO(nkostylev): Figure out whether this would affect autotests as well. |
- if (is_registered) |
+ bool disable_boot_animation = |
Ivan Korotkov
2012/07/31 22:20:26
Do you need a separate variable?
Nikita (slow)
2012/08/01 02:09:06
I think it is a bit more readable this way.
|
+ 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; |
@@ -67,7 +72,15 @@ class UserWallpaperDelegate: public ash::UserWallpaperDelegate { |
content::NotificationService::NoDetails()); |
} |
+ virtual void OnWallpaperBootAnimationFinished() OVERRIDE { |
+ // Setting this variable would make sure that boot animation type |
Ivan Korotkov
2012/07/31 22:20:26
// Make sure that...
Nikita (slow)
2012/08/01 02:09:06
Done.
|
+ // is used only once. |
+ boot_animation_finished_ = true; |
+ } |
+ |
private: |
+ bool boot_animation_finished_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); |
}; |