| 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/login/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| 6 | 6 |
| 7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
| 8 #include "ash/desktop_background/desktop_background_resources.h" | 8 #include "ash/desktop_background/desktop_background_resources.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 263 } |
| 264 | 264 |
| 265 void WallpaperManager::InitializeWallpaper() { | 265 void WallpaperManager::InitializeWallpaper() { |
| 266 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 266 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 267 UserManager* user_manager = UserManager::Get(); | 267 UserManager* user_manager = UserManager::Get(); |
| 268 | 268 |
| 269 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) | 269 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) |
| 270 WizardController::SetZeroDelays(); | 270 WizardController::SetZeroDelays(); |
| 271 | 271 |
| 272 // Zero delays is also set in autotests. | 272 // Zero delays is also set in autotests. |
| 273 if (WizardController::IsZeroDelayEnabled()) | 273 if (WizardController::IsZeroDelayEnabled()) { |
| 274 // Ensure tests have some sort of wallpaper. |
| 275 ash::Shell::GetInstance()->desktop_background_controller()-> |
| 276 CreateEmptyWallpaper(); |
| 274 return; | 277 return; |
| 278 } |
| 275 | 279 |
| 276 bool disable_new_oobe = CommandLine::ForCurrentProcess()-> | 280 bool disable_new_oobe = CommandLine::ForCurrentProcess()-> |
| 277 HasSwitch(switches::kDisableNewOobe); | 281 HasSwitch(switches::kDisableNewOobe); |
| 278 bool disable_boot_animation = CommandLine::ForCurrentProcess()-> | 282 bool disable_boot_animation = CommandLine::ForCurrentProcess()-> |
| 279 HasSwitch(switches::kDisableBootAnimation); | 283 HasSwitch(switches::kDisableBootAnimation); |
| 280 | 284 |
| 281 if (!user_manager->IsUserLoggedIn()) { | 285 if (!user_manager->IsUserLoggedIn()) { |
| 282 if (!disable_new_oobe) { | 286 if (!disable_new_oobe) { |
| 283 if (!WizardController::IsDeviceRegistered()) { | 287 if (!WizardController::IsDeviceRegistered()) { |
| 284 ash::Shell::GetInstance()->desktop_background_controller()-> | 288 ash::Shell::GetInstance()->desktop_background_controller()-> |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 | 1114 |
| 1111 void WallpaperManager::SystemResumed() { | 1115 void WallpaperManager::SystemResumed() { |
| 1112 BatchUpdateWallpaper(); | 1116 BatchUpdateWallpaper(); |
| 1113 } | 1117 } |
| 1114 | 1118 |
| 1115 void WallpaperManager::TimezoneChanged(const icu::TimeZone& timezone) { | 1119 void WallpaperManager::TimezoneChanged(const icu::TimeZone& timezone) { |
| 1116 RestartTimer(); | 1120 RestartTimer(); |
| 1117 } | 1121 } |
| 1118 | 1122 |
| 1119 } // chromeos | 1123 } // chromeos |
| OLD | NEW |