| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // |kDisableOobeAnimation| disables OOBE animation for slow hardware. |
| 56 bool is_registered = WizardController::IsDeviceRegistered(); | 56 bool is_registered = WizardController::IsDeviceRegistered(); |
| 57 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 57 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 58 bool disable_boot_animation = command_line-> | 58 bool disable_boot_animation = command_line-> |
| 59 HasSwitch(switches::kDisableBootAnimation); | 59 HasSwitch(switches::kDisableBootAnimation); |
| 60 bool disable_oobe_animation = command_line-> | 60 bool disable_oobe_animation = command_line-> |
| 61 HasSwitch(switches::kDisableOobeAnimation); | 61 HasSwitch(switches::kDisableOobeAnimation); |
| 62 if (disable_oobe_animation || (is_registered && disable_boot_animation)) | 62 if ((!is_registered && disable_oobe_animation) || |
| 63 (is_registered && disable_boot_animation)) |
| 63 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; | 64 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
| 64 | 65 |
| 65 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE; | 66 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE; |
| 66 } | 67 } |
| 67 | 68 |
| 68 virtual void InitializeWallpaper() OVERRIDE { | 69 virtual void InitializeWallpaper() OVERRIDE { |
| 69 chromeos::WallpaperManager::Get()->InitializeWallpaper(); | 70 chromeos::WallpaperManager::Get()->InitializeWallpaper(); |
| 70 } | 71 } |
| 71 | 72 |
| 72 virtual void OpenSetWallpaperPage() OVERRIDE { | 73 virtual void OpenSetWallpaperPage() OVERRIDE { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 95 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); | 96 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace | 99 } // namespace |
| 99 | 100 |
| 100 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { | 101 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { |
| 101 return new chromeos::UserWallpaperDelegate(); | 102 return new chromeos::UserWallpaperDelegate(); |
| 102 } | 103 } |
| 103 | 104 |
| 104 } // namespace chromeos | 105 } // namespace chromeos |
| OLD | NEW |