Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Side by Side Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc

Issue 1023183002: TrayUser::GetTrayIndex method removed as not necessary. Swich->Switch renamed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698