Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: ash/system/user/tray_user_separator.cc

Issue 2099793002: mash: Migrate some system user files to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "ash/system/user/tray_user_separator.h"
6
7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/wm_shell.h"
9 #include "ash/shell.h"
10 #include "ui/views/view.h"
11
12 namespace ash {
13
14 TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray)
15 : SystemTrayItem(system_tray),
16 separator_shown_(false) {
17 }
18
19 views::View* TrayUserSeparator::CreateTrayView(LoginStatus status) {
20 return NULL;
21 }
22
23 views::View* TrayUserSeparator::CreateDefaultView(LoginStatus status) {
24 if (status == LoginStatus::NOT_LOGGED_IN)
25 return NULL;
26
27 const SessionStateDelegate* session_state_delegate =
28 Shell::GetInstance()->session_state_delegate();
29
30 // If the screen is locked, a system modal dialog or a single user is shown,
31 // show nothing.
32 if (session_state_delegate->IsUserSessionBlocked() ||
33 WmShell::Get()->IsSystemModalWindowOpen() ||
34 session_state_delegate->NumberOfLoggedInUsers() < 2)
35 return NULL;
36
37 separator_shown_ = true;
38 return new views::View();
39 }
40
41 views::View* TrayUserSeparator::CreateDetailedView(LoginStatus status) {
42 return NULL;
43 }
44
45 void TrayUserSeparator::DestroyDefaultView() {
46 separator_shown_ = false;
47 }
48
49 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698