| 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/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/shelf/shelf.h" | 8 #include "ash/common/shelf/shelf.h" |
| 9 #include "ash/common/shelf/shelf_layout_manager.h" | 9 #include "ash/common/shelf/shelf_layout_manager.h" |
| 10 #include "ash/common/shelf/shelf_widget.h" | 10 #include "ash/common/shelf/shelf_widget.h" |
| 11 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 11 #include "ash/common/wm/mru_window_tracker.h" | 12 #include "ash/common/wm/mru_window_tracker.h" |
| 12 #include "ash/common/wm/window_positioner.h" | 13 #include "ash/common/wm/window_positioner.h" |
| 13 #include "ash/common/wm/window_state.h" | 14 #include "ash/common/wm/window_state.h" |
| 14 #include "ash/common/wm_shell.h" | 15 #include "ash/common/wm_shell.h" |
| 15 #include "ash/common/wm_window.h" | 16 #include "ash/common/wm_window.h" |
| 16 #include "ash/desktop_background/user_wallpaper_delegate.h" | |
| 17 #include "ash/root_window_controller.h" | 17 #include "ash/root_window_controller.h" |
| 18 #include "ash/shell.h" | 18 #include "ash/shell.h" |
| 19 #include "ash/wm/window_state_aura.h" | 19 #include "ash/wm/window_state_aura.h" |
| 20 #include "ash/wm/window_util.h" | 20 #include "ash/wm/window_util.h" |
| 21 #include "base/macros.h" | 21 #include "base/macros.h" |
| 22 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 22 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 24 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chrom
eos.h" | 24 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chrom
eos.h" |
| 25 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" | 25 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" |
| 26 #include "ui/compositor/layer_animation_observer.h" | 26 #include "ui/compositor/layer_animation_observer.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 void UserSwitchAnimatorChromeOS::FinalizeAnimation() { | 185 void UserSwitchAnimatorChromeOS::FinalizeAnimation() { |
| 186 user_changed_animation_timer_.reset(); | 186 user_changed_animation_timer_.reset(); |
| 187 while (ANIMATION_STEP_ENDED != animation_step_) | 187 while (ANIMATION_STEP_ENDED != animation_step_) |
| 188 AdvanceUserTransitionAnimation(); | 188 AdvanceUserTransitionAnimation(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void UserSwitchAnimatorChromeOS::TransitionWallpaper( | 191 void UserSwitchAnimatorChromeOS::TransitionWallpaper( |
| 192 AnimationStep animation_step) { | 192 AnimationStep animation_step) { |
| 193 // Handle the wallpaper switch. | 193 // Handle the wallpaper switch. |
| 194 ash::UserWallpaperDelegate* wallpaper_delegate = | 194 ash::WallpaperDelegate* wallpaper_delegate = |
| 195 ash::Shell::GetInstance()->user_wallpaper_delegate(); | 195 ash::WmShell::Get()->wallpaper_delegate(); |
| 196 if (animation_step == ANIMATION_STEP_HIDE_OLD_USER) { | 196 if (animation_step == ANIMATION_STEP_HIDE_OLD_USER) { |
| 197 // Set the wallpaper cross dissolve animation duration to our complete | 197 // Set the wallpaper cross dissolve animation duration to our complete |
| 198 // animation cycle for a fade in and fade out. | 198 // animation cycle for a fade in and fade out. |
| 199 int duration = | 199 int duration = |
| 200 NO_USER_COVERS_SCREEN == screen_cover_ ? (2 * animation_speed_ms_) : 0; | 200 NO_USER_COVERS_SCREEN == screen_cover_ ? (2 * animation_speed_ms_) : 0; |
| 201 wallpaper_delegate->SetAnimationDurationOverride( | 201 wallpaper_delegate->SetAnimationDurationOverride( |
| 202 std::max(duration, kMinimalAnimationTimeMS)); | 202 std::max(duration, kMinimalAnimationTimeMS)); |
| 203 if (screen_cover_ != NEW_USER_COVERS_SCREEN) { | 203 if (screen_cover_ != NEW_USER_COVERS_SCREEN) { |
| 204 chromeos::WallpaperManager::Get()->SetUserWallpaperNow(new_account_id_); | 204 chromeos::WallpaperManager::Get()->SetUserWallpaperNow(new_account_id_); |
| 205 wallpaper_user_id_for_test_ = | 205 wallpaper_user_id_for_test_ = |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 if (itr != window_to_entry_map.end()) { | 436 if (itr != window_to_entry_map.end()) { |
| 437 windows_by_account_id_[itr->second->show_for_user()].push_back( | 437 windows_by_account_id_[itr->second->show_for_user()].push_back( |
| 438 child_window); | 438 child_window); |
| 439 } | 439 } |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace chrome | 445 } // namespace chrome |
| OLD | NEW |