This source file includes following definitions.
- separator_shown_
- CreateTrayView
- CreateDefaultView
- CreateDetailedView
- DestroyDefaultView
#include "ash/system/user/tray_user_separator.h"
#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ui/views/view.h"
namespace ash {
TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray)
: SystemTrayItem(system_tray),
separator_shown_(false) {
}
views::View* TrayUserSeparator::CreateTrayView(user::LoginStatus status) {
return NULL;
}
views::View* TrayUserSeparator::CreateDefaultView(user::LoginStatus status) {
if (status == user::LOGGED_IN_NONE)
return NULL;
const SessionStateDelegate* session_state_delegate =
Shell::GetInstance()->session_state_delegate();
if (session_state_delegate->IsUserSessionBlocked() ||
session_state_delegate->NumberOfLoggedInUsers() < 2)
return NULL;
separator_shown_ = true;
return new views::View();
}
views::View* TrayUserSeparator::CreateDetailedView(user::LoginStatus status) {
return NULL;
}
void TrayUserSeparator::DestroyDefaultView() {
separator_shown_ = false;
}
}