| 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/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 policy::BrowserPolicyConnectorChromeOS* connector = | 306 policy::BrowserPolicyConnectorChromeOS* connector = |
| 307 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 307 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 308 policy::DeviceCloudPolicyManagerChromeOS* policy_manager = | 308 policy::DeviceCloudPolicyManagerChromeOS* policy_manager = |
| 309 connector->GetDeviceCloudPolicyManager(); | 309 connector->GetDeviceCloudPolicyManager(); |
| 310 if (policy_manager) | 310 if (policy_manager) |
| 311 policy_manager->core()->store()->RemoveObserver(this); | 311 policy_manager->core()->store()->RemoveObserver(this); |
| 312 | 312 |
| 313 user_manager::UserManager::Get()->RemoveSessionStateObserver(this); | 313 user_manager::UserManager::Get()->RemoveSessionStateObserver(this); |
| 314 } | 314 } |
| 315 | 315 |
| 316 // Overridden from ash::SystemTrayDelegate: | |
| 317 bool SystemTrayDelegateChromeOS::GetTrayVisibilityOnStartup() { | |
| 318 // In case of OOBE / sign in screen tray will be shown later. | |
| 319 return LoginState::Get()->IsUserLoggedIn(); | |
| 320 } | |
| 321 | |
| 322 ash::LoginStatus SystemTrayDelegateChromeOS::GetUserLoginStatus() const { | 316 ash::LoginStatus SystemTrayDelegateChromeOS::GetUserLoginStatus() const { |
| 323 if (!LoginState::Get()->IsUserLoggedIn()) | 317 if (!LoginState::Get()->IsUserLoggedIn()) |
| 324 return ash::LoginStatus::NOT_LOGGED_IN; | 318 return ash::LoginStatus::NOT_LOGGED_IN; |
| 325 | 319 |
| 326 if (screen_locked_) | 320 if (screen_locked_) |
| 327 return ash::LoginStatus::LOCKED; | 321 return ash::LoginStatus::LOCKED; |
| 328 | 322 |
| 329 LoginState::LoggedInUserType user_type = | 323 LoginState::LoggedInUserType user_type = |
| 330 LoginState::Get()->GetLoggedInUserType(); | 324 LoginState::Get()->GetLoggedInUserType(); |
| 331 switch (user_type) { | 325 switch (user_type) { |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " | 1211 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " |
| 1218 << "ENABLE_SUPERVISED_USERS undefined."; | 1212 << "ENABLE_SUPERVISED_USERS undefined."; |
| 1219 return base::string16(); | 1213 return base::string16(); |
| 1220 } | 1214 } |
| 1221 | 1215 |
| 1222 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1216 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1223 return new SystemTrayDelegateChromeOS(); | 1217 return new SystemTrayDelegateChromeOS(); |
| 1224 } | 1218 } |
| 1225 | 1219 |
| 1226 } // namespace chromeos | 1220 } // namespace chromeos |
| OLD | NEW |