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

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

Issue 2461693003: MD cros - Fix padding in system tray (Closed)
Patch Set: nit + rebase Created 4 years, 1 month 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
« no previous file with comments | « ash/common/system/user/tray_user_separator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/common/system/user/tray_user_separator.h" 5 #include "ash/common/system/user/tray_user_separator.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray) 13 TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray)
14 : SystemTrayItem(system_tray, UMA_NOT_RECORDED), separator_shown_(false) {} 14 : SystemTrayItem(system_tray, UMA_NOT_RECORDED), separator_shown_(false) {}
15 15
16 views::View* TrayUserSeparator::CreateTrayView(LoginStatus status) {
17 return NULL;
18 }
19
20 views::View* TrayUserSeparator::CreateDefaultView(LoginStatus status) { 16 views::View* TrayUserSeparator::CreateDefaultView(LoginStatus status) {
21 if (status == LoginStatus::NOT_LOGGED_IN) 17 if (status == LoginStatus::NOT_LOGGED_IN)
22 return NULL; 18 return NULL;
23 19
24 const SessionStateDelegate* session_state_delegate = 20 const SessionStateDelegate* session_state_delegate =
25 WmShell::Get()->GetSessionStateDelegate(); 21 WmShell::Get()->GetSessionStateDelegate();
26 22
27 // If the screen is locked, a system modal dialog or a single user is shown, 23 // If the screen is locked, a system modal dialog or a single user is shown,
28 // show nothing. 24 // show nothing.
29 if (session_state_delegate->IsUserSessionBlocked() || 25 if (session_state_delegate->IsUserSessionBlocked() ||
30 WmShell::Get()->IsSystemModalWindowOpen() || 26 WmShell::Get()->IsSystemModalWindowOpen() ||
31 session_state_delegate->NumberOfLoggedInUsers() < 2) 27 session_state_delegate->NumberOfLoggedInUsers() < 2)
32 return NULL; 28 return NULL;
33 29
34 separator_shown_ = true; 30 separator_shown_ = true;
35 return new views::View(); 31 return new views::View();
36 } 32 }
37 33
38 views::View* TrayUserSeparator::CreateDetailedView(LoginStatus status) {
39 return NULL;
40 }
41
42 void TrayUserSeparator::DestroyDefaultView() { 34 void TrayUserSeparator::DestroyDefaultView() {
43 separator_shown_ = false; 35 separator_shown_ = false;
44 } 36 }
45 37
46 } // namespace ash 38 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/user/tray_user_separator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698