OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" | 5 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
9 #include "ash/desktop_background/desktop_background_resources.h" | 9 #include "ash/desktop_background/desktop_background_resources.h" |
10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 class UserWallpaperDelegate: public ash::UserWallpaperDelegate { | 28 class UserWallpaperDelegate: public ash::UserWallpaperDelegate { |
29 public: | 29 public: |
30 UserWallpaperDelegate() { | 30 UserWallpaperDelegate() { |
31 } | 31 } |
32 | 32 |
33 virtual ~UserWallpaperDelegate() { | 33 virtual ~UserWallpaperDelegate() { |
34 } | 34 } |
35 | 35 |
36 virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE { | 36 virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE { |
37 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe)) | 37 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 38 switches::kDisableNewOobe) || |
| 39 WizardController::IsZeroDelayEnabled()) { |
38 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; | 40 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
| 41 } |
39 | 42 |
40 bool is_registered = WizardController::IsDeviceRegistered(); | 43 bool is_registered = WizardController::IsDeviceRegistered(); |
41 // TODO(nkostylev): Figure out whether this would affect autotests as well. | 44 // TODO(nkostylev): Figure out whether this would affect autotests as well. |
42 if (is_registered) | 45 if (is_registered) |
43 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; | 46 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
44 else | 47 else |
45 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE; | 48 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE; |
46 } | 49 } |
47 | 50 |
48 virtual void InitializeWallpaper() OVERRIDE { | 51 virtual void InitializeWallpaper() OVERRIDE { |
(...skipping 19 matching lines...) Expand all Loading... |
68 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); | 71 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); |
69 }; | 72 }; |
70 | 73 |
71 } // namespace | 74 } // namespace |
72 | 75 |
73 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { | 76 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { |
74 return new chromeos::UserWallpaperDelegate(); | 77 return new chromeos::UserWallpaperDelegate(); |
75 } | 78 } |
76 | 79 |
77 } // namespace chromeos | 80 } // namespace chromeos |
OLD | NEW |