| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 void SessionStateDelegateChromeos::AddSessionStateObserver( | 207 void SessionStateDelegateChromeos::AddSessionStateObserver( |
| 208 ash::SessionStateObserver* observer) { | 208 ash::SessionStateObserver* observer) { |
| 209 session_state_observer_list_.AddObserver(observer); | 209 session_state_observer_list_.AddObserver(observer); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void SessionStateDelegateChromeos::RemoveSessionStateObserver( | 212 void SessionStateDelegateChromeos::RemoveSessionStateObserver( |
| 213 ash::SessionStateObserver* observer) { | 213 ash::SessionStateObserver* observer) { |
| 214 session_state_observer_list_.RemoveObserver(observer); | 214 session_state_observer_list_.RemoveObserver(observer); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void SessionStateDelegateChromeos::HideMultipleSigninScreen() { |
| 218 if (this->GetSessionState() == |
| 219 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) { |
| 220 chromeos::UserAddingScreen::Get()->Cancel(); |
| 221 } |
| 222 } |
| 223 |
| 217 void SessionStateDelegateChromeos::LoggedInStateChanged() { | 224 void SessionStateDelegateChromeos::LoggedInStateChanged() { |
| 218 SetSessionState(chromeos::LoginState::Get()->IsUserLoggedIn() ? | 225 SetSessionState(chromeos::LoginState::Get()->IsUserLoggedIn() ? |
| 219 SESSION_STATE_ACTIVE : SESSION_STATE_LOGIN_PRIMARY, false); | 226 SESSION_STATE_ACTIVE : SESSION_STATE_LOGIN_PRIMARY, false); |
| 220 } | 227 } |
| 221 | 228 |
| 222 void SessionStateDelegateChromeos::ActiveUserChanged( | 229 void SessionStateDelegateChromeos::ActiveUserChanged( |
| 223 const chromeos::User* active_user) { | 230 const chromeos::User* active_user) { |
| 224 FOR_EACH_OBSERVER(ash::SessionStateObserver, | 231 FOR_EACH_OBSERVER(ash::SessionStateObserver, |
| 225 session_state_observer_list_, | 232 session_state_observer_list_, |
| 226 ActiveUserChanged(active_user->email())); | 233 ActiveUserChanged(active_user->email())); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 248 | 255 |
| 249 session_state_ = new_state; | 256 session_state_ = new_state; |
| 250 NotifySessionStateChanged(); | 257 NotifySessionStateChanged(); |
| 251 } | 258 } |
| 252 | 259 |
| 253 void SessionStateDelegateChromeos::NotifySessionStateChanged() { | 260 void SessionStateDelegateChromeos::NotifySessionStateChanged() { |
| 254 FOR_EACH_OBSERVER(ash::SessionStateObserver, | 261 FOR_EACH_OBSERVER(ash::SessionStateObserver, |
| 255 session_state_observer_list_, | 262 session_state_observer_list_, |
| 256 SessionStateChanged(session_state_)); | 263 SessionStateChanged(session_state_)); |
| 257 } | 264 } |
| OLD | NEW |