| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/ash/multi_user/user_switch_animator_chromeos.h" | 5 #include "chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_layout_manager.h" | 7 #include "ash/common/shelf/shelf_layout_manager.h" |
| 8 #include "ash/common/shelf/shelf_widget.h" | 8 #include "ash/common/shelf/shelf_widget.h" |
| 9 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
| 10 #include "ash/common/wallpaper/wallpaper_delegate.h" | 10 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 void UserSwitchAnimatorChromeOS::FinalizeAnimation() { | 184 void UserSwitchAnimatorChromeOS::FinalizeAnimation() { |
| 185 user_changed_animation_timer_.reset(); | 185 user_changed_animation_timer_.reset(); |
| 186 while (ANIMATION_STEP_ENDED != animation_step_) | 186 while (ANIMATION_STEP_ENDED != animation_step_) |
| 187 AdvanceUserTransitionAnimation(); | 187 AdvanceUserTransitionAnimation(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void UserSwitchAnimatorChromeOS::TransitionWallpaper( | 190 void UserSwitchAnimatorChromeOS::TransitionWallpaper( |
| 191 AnimationStep animation_step) { | 191 AnimationStep animation_step) { |
| 192 // Handle the wallpaper switch. | 192 // Handle the wallpaper switch. |
| 193 ash::WallpaperDelegate* wallpaper_delegate = | 193 ash::WallpaperDelegate* wallpaper_delegate = |
| 194 ash::WmShell::Get()->wallpaper_delegate(); | 194 ash::Shell::Get()->wallpaper_delegate(); |
| 195 if (animation_step == ANIMATION_STEP_HIDE_OLD_USER) { | 195 if (animation_step == ANIMATION_STEP_HIDE_OLD_USER) { |
| 196 // Set the wallpaper cross dissolve animation duration to our complete | 196 // Set the wallpaper cross dissolve animation duration to our complete |
| 197 // animation cycle for a fade in and fade out. | 197 // animation cycle for a fade in and fade out. |
| 198 int duration = | 198 int duration = |
| 199 NO_USER_COVERS_SCREEN == screen_cover_ ? (2 * animation_speed_ms_) : 0; | 199 NO_USER_COVERS_SCREEN == screen_cover_ ? (2 * animation_speed_ms_) : 0; |
| 200 wallpaper_delegate->SetAnimationDurationOverride( | 200 wallpaper_delegate->SetAnimationDurationOverride( |
| 201 std::max(duration, kMinimalAnimationTimeMS)); | 201 std::max(duration, kMinimalAnimationTimeMS)); |
| 202 if (screen_cover_ != NEW_USER_COVERS_SCREEN) { | 202 if (screen_cover_ != NEW_USER_COVERS_SCREEN) { |
| 203 chromeos::WallpaperManager::Get()->SetUserWallpaperNow(new_account_id_); | 203 chromeos::WallpaperManager::Get()->SetUserWallpaperNow(new_account_id_); |
| 204 wallpaper_user_id_for_test_ = | 204 wallpaper_user_id_for_test_ = |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 if (itr != window_to_entry_map.end()) { | 435 if (itr != window_to_entry_map.end()) { |
| 436 windows_by_account_id_[itr->second->show_for_user()].push_back( | 436 windows_by_account_id_[itr->second->show_for_user()].push_back( |
| 437 child_window); | 437 child_window); |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 | 443 |
| 444 } // namespace chrome | 444 } // namespace chrome |
| OLD | NEW |