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