| 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/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/desktop_background/user_wallpaper_delegate.h" |
| 17 #include "ash/root_window_controller.h" | 18 #include "ash/root_window_controller.h" |
| 18 #include "ash/shell.h" | 19 #include "ash/shell.h" |
| 19 #include "ash/wm/window_state_aura.h" | 20 #include "ash/wm/window_state_aura.h" |
| 20 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 ash::Shelf* shelf = ash::Shelf::ForWindow(ash::WmWindowAura::Get(window)); | 269 ash::Shelf* shelf = ash::Shelf::ForWindow(ash::WmWindowAura::Get(window)); |
| 269 if (GetScreenCover(window) != NO_USER_COVERS_SCREEN && | 270 if (GetScreenCover(window) != NO_USER_COVERS_SCREEN && |
| 270 (!chrome_launcher_controller || | 271 (!chrome_launcher_controller || |
| 271 !chrome_launcher_controller->ShelfBoundsChangesProbablyWithUser( | 272 !chrome_launcher_controller->ShelfBoundsChangesProbablyWithUser( |
| 272 shelf, new_account_id_))) { | 273 shelf, new_account_id_))) { |
| 273 shelf->shelf_widget()->HideShelfBehindBlackBar(true, duration_override); | 274 shelf->shelf_widget()->HideShelfBehindBlackBar(true, duration_override); |
| 274 } else { | 275 } else { |
| 275 // This shelf change is only part of the animation and will be updated by | 276 // This shelf change is only part of the animation and will be updated by |
| 276 // ChromeLauncherController::ActiveUserChanged() to the new users value. | 277 // ChromeLauncherController::ActiveUserChanged() to the new users value. |
| 277 // Note that the user preference will not be changed. | 278 // Note that the user preference will not be changed. |
| 278 shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN); | 279 shelf->wm_shelf()->SetAutoHideBehavior( |
| 280 ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
| 279 } | 281 } |
| 280 } | 282 } |
| 281 } | 283 } |
| 282 | 284 |
| 283 void UserSwitchAnimatorChromeOS::TransitionWindows( | 285 void UserSwitchAnimatorChromeOS::TransitionWindows( |
| 284 AnimationStep animation_step) { | 286 AnimationStep animation_step) { |
| 285 // Disable the window position manager and the MRU window tracker temporarily. | 287 // Disable the window position manager and the MRU window tracker temporarily. |
| 286 UserChangeActionDisabler disabler; | 288 UserChangeActionDisabler disabler; |
| 287 | 289 |
| 288 // Animation duration. | 290 // Animation duration. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 if (itr != window_to_entry_map.end()) { | 438 if (itr != window_to_entry_map.end()) { |
| 437 windows_by_account_id_[itr->second->show_for_user()].push_back( | 439 windows_by_account_id_[itr->second->show_for_user()].push_back( |
| 438 child_window); | 440 child_window); |
| 439 } | 441 } |
| 440 } | 442 } |
| 441 } | 443 } |
| 442 } | 444 } |
| 443 } | 445 } |
| 444 | 446 |
| 445 } // namespace chrome | 447 } // namespace chrome |
| OLD | NEW |