| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/multi_user_window_manager_chromeos.h" | 5 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/multi_profile_uma.h" | 8 #include "ash/multi_profile_uma.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 void MultiUserWindowManagerChromeOS::RemoveObserver(Observer* observer) { | 415 void MultiUserWindowManagerChromeOS::RemoveObserver(Observer* observer) { |
| 416 observers_.RemoveObserver(observer); | 416 observers_.RemoveObserver(observer); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void MultiUserWindowManagerChromeOS::ActiveUserChanged( | 419 void MultiUserWindowManagerChromeOS::ActiveUserChanged( |
| 420 const std::string& user_id) { | 420 const std::string& user_id) { |
| 421 // This needs to be set before the animation starts. | 421 // This needs to be set before the animation starts. |
| 422 current_user_id_ = user_id; | 422 current_user_id_ = user_id; |
| 423 | 423 |
| 424 animation_.reset( | 424 animation_.reset( |
| 425 new UserSwichAnimatorChromeOS( | 425 new UserSwitchAnimatorChromeOS( |
| 426 this, user_id, GetAdjustedAnimationTimeInMS(kUserFadeTimeMS))); | 426 this, user_id, GetAdjustedAnimationTimeInMS(kUserFadeTimeMS))); |
| 427 // Call notifier here instead of observing ActiveUserChanged because | 427 // Call notifier here instead of observing ActiveUserChanged because |
| 428 // this must happen after MultiUserWindowManagerChromeOS is notified. | 428 // this must happen after MultiUserWindowManagerChromeOS is notified. |
| 429 ash::Shell::GetInstance() | 429 ash::Shell::GetInstance() |
| 430 ->system_tray_notifier() | 430 ->system_tray_notifier() |
| 431 ->NotifyMediaCaptureChanged(); | 431 ->NotifyMediaCaptureChanged(); |
| 432 } | 432 } |
| 433 | 433 |
| 434 void MultiUserWindowManagerChromeOS::OnWindowDestroyed(aura::Window* window) { | 434 void MultiUserWindowManagerChromeOS::OnWindowDestroyed(aura::Window* window) { |
| 435 if (GetWindowOwner(window).empty()) { | 435 if (GetWindowOwner(window).empty()) { |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 DCHECK_EQ(visible, window->IsVisible()); | 738 DCHECK_EQ(visible, window->IsVisible()); |
| 739 } | 739 } |
| 740 | 740 |
| 741 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS( | 741 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS( |
| 742 int default_time_in_ms) const { | 742 int default_time_in_ms) const { |
| 743 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms : | 743 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms : |
| 744 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0); | 744 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0); |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace chrome | 747 } // namespace chrome |
| OLD | NEW |