don't pretend to support dbus on windows in dbus_export.h
[chromium-blink-merge.git] / ash / system / user / tray_user_separator.cc
blob7058d2fbb9507645b1a762a95b9c78cc4256785d
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
3 // found in the LICENSE file.
5 #include "ash/system/user/tray_user_separator.h"
7 #include "ash/session/session_state_delegate.h"
8 #include "ash/shell.h"
9 #include "ui/views/view.h"
11 namespace ash {
13 TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray)
14 : SystemTrayItem(system_tray),
15 separator_shown_(false) {
18 views::View* TrayUserSeparator::CreateTrayView(user::LoginStatus status) {
19 return NULL;
22 views::View* TrayUserSeparator::CreateDefaultView(user::LoginStatus status) {
23 if (status == user::LOGGED_IN_NONE)
24 return NULL;
26 const SessionStateDelegate* session_state_delegate =
27 Shell::GetInstance()->session_state_delegate();
29 // If the screen is locked, or only a single user is shown, show nothing.
30 if (session_state_delegate->IsUserSessionBlocked() ||
31 session_state_delegate->NumberOfLoggedInUsers() < 2)
32 return NULL;
34 separator_shown_ = true;
35 return new views::View();
38 views::View* TrayUserSeparator::CreateDetailedView(user::LoginStatus status) {
39 return NULL;
42 void TrayUserSeparator::DestroyDefaultView() {
43 separator_shown_ = false;
46 } // namespace ash