| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/session_state_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/multi_profile_uma.h" | 7 #include "ash/multi_profile_uma.h" |
| 8 #include "ash/session/session_state_observer.h" | 8 #include "ash/session/session_state_observer.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 return (has_login_manager && !IsActiveUserSessionStarted()) || | 126 return (has_login_manager && !IsActiveUserSessionStarted()) || |
| 127 IsScreenLocked() || | 127 IsScreenLocked() || |
| 128 chromeos::UserAddingScreen::Get()->IsRunning(); | 128 chromeos::UserAddingScreen::Get()->IsRunning(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 ash::SessionStateDelegate::SessionState | 131 ash::SessionStateDelegate::SessionState |
| 132 SessionStateDelegateChromeos::GetSessionState() const { | 132 SessionStateDelegateChromeos::GetSessionState() const { |
| 133 return session_state_; | 133 return session_state_; |
| 134 } | 134 } |
| 135 | 135 |
| 136 const ash::UserInfo* SessionStateDelegateChromeos::GetUserInfo( | 136 const user_manager::UserInfo* SessionStateDelegateChromeos::GetUserInfo( |
| 137 ash::MultiProfileIndex index) const { | 137 ash::MultiProfileIndex index) const { |
| 138 DCHECK_LT(index, NumberOfLoggedInUsers()); | 138 DCHECK_LT(index, NumberOfLoggedInUsers()); |
| 139 return chromeos::UserManager::Get()->GetLRULoggedInUsers()[index]; | 139 return chromeos::UserManager::Get()->GetLRULoggedInUsers()[index]; |
| 140 } | 140 } |
| 141 | 141 |
| 142 const ash::UserInfo* SessionStateDelegateChromeos::GetUserInfo( | 142 const user_manager::UserInfo* SessionStateDelegateChromeos::GetUserInfo( |
| 143 content::BrowserContext* context) const { | 143 content::BrowserContext* context) const { |
| 144 DCHECK(context); | 144 DCHECK(context); |
| 145 return chromeos::ProfileHelper::Get()->GetUserByProfile( | 145 return chromeos::ProfileHelper::Get()->GetUserByProfile( |
| 146 Profile::FromBrowserContext(context)); | 146 Profile::FromBrowserContext(context)); |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool SessionStateDelegateChromeos::ShouldShowAvatar( | 149 bool SessionStateDelegateChromeos::ShouldShowAvatar( |
| 150 aura::Window* window) const { | 150 aura::Window* window) const { |
| 151 return chrome::MultiUserWindowManager::GetInstance()-> | 151 return chrome::MultiUserWindowManager::GetInstance()-> |
| 152 ShouldShowAvatar(window); | 152 ShouldShowAvatar(window); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 session_state_ = new_state; | 250 session_state_ = new_state; |
| 251 NotifySessionStateChanged(); | 251 NotifySessionStateChanged(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void SessionStateDelegateChromeos::NotifySessionStateChanged() { | 254 void SessionStateDelegateChromeos::NotifySessionStateChanged() { |
| 255 FOR_EACH_OBSERVER(ash::SessionStateObserver, | 255 FOR_EACH_OBSERVER(ash::SessionStateObserver, |
| 256 session_state_observer_list_, | 256 session_state_observer_list_, |
| 257 SessionStateChanged(session_state_)); | 257 SessionStateChanged(session_state_)); |
| 258 } | 258 } |
| OLD | NEW |