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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 virtual ~UserWallpaperDelegate() { | 46 virtual ~UserWallpaperDelegate() { |
47 } | 47 } |
48 | 48 |
49 virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE { | 49 virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE { |
50 if (IsNormalWallpaperChange() || boot_animation_finished_) | 50 if (IsNormalWallpaperChange() || boot_animation_finished_) |
51 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; | 51 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
52 | 52 |
53 // It is a first boot case now. If kDisableBootAnimation flag | 53 // It is a first boot case now. If kDisableBootAnimation flag |
54 // is passed, it only disables any transition after OOBE. | 54 // is passed, it only disables any transition after OOBE. |
| 55 // |kDisableOobeAnimation| disables OOBE animation for slow hardware. |
55 bool is_registered = WizardController::IsDeviceRegistered(); | 56 bool is_registered = WizardController::IsDeviceRegistered(); |
56 bool disable_boot_animation = CommandLine::ForCurrentProcess()-> | 57 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 58 bool disable_boot_animation = command_line-> |
57 HasSwitch(switches::kDisableBootAnimation); | 59 HasSwitch(switches::kDisableBootAnimation); |
58 if (is_registered && disable_boot_animation) | 60 bool disable_oobe_animation = command_line-> |
| 61 HasSwitch(switches::kDisableOobeAnimation); |
| 62 if (disable_oobe_animation || (is_registered && disable_boot_animation)) |
59 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; | 63 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
60 | 64 |
61 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE; | 65 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE; |
62 } | 66 } |
63 | 67 |
64 virtual void InitializeWallpaper() OVERRIDE { | 68 virtual void InitializeWallpaper() OVERRIDE { |
65 chromeos::WallpaperManager::Get()->InitializeWallpaper(); | 69 chromeos::WallpaperManager::Get()->InitializeWallpaper(); |
66 } | 70 } |
67 | 71 |
68 virtual void OpenSetWallpaperPage() OVERRIDE { | 72 virtual void OpenSetWallpaperPage() OVERRIDE { |
(...skipping 22 matching lines...) Expand all Loading... |
91 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); | 95 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); |
92 }; | 96 }; |
93 | 97 |
94 } // namespace | 98 } // namespace |
95 | 99 |
96 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { | 100 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { |
97 return new chromeos::UserWallpaperDelegate(); | 101 return new chromeos::UserWallpaperDelegate(); |
98 } | 102 } |
99 | 103 |
100 } // namespace chromeos | 104 } // namespace chromeos |
OLD | NEW |