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

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

Issue 473953004: Revert of Multiprofile security: Show a warning messagebox when desktop casting/sharing is turned on upon user (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | ash/system/user/user_view.cc » ('j') | 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/system/user/tray_user_separator.h" 5 #include "ash/system/user/tray_user_separator.h"
6 6
7 #include "ash/session/session_state_delegate.h" 7 #include "ash/session/session_state_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/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), 14 : SystemTrayItem(system_tray),
15 separator_shown_(false) { 15 separator_shown_(false) {
16 } 16 }
17 17
18 views::View* TrayUserSeparator::CreateTrayView(user::LoginStatus status) { 18 views::View* TrayUserSeparator::CreateTrayView(user::LoginStatus status) {
19 return NULL; 19 return NULL;
20 } 20 }
21 21
22 views::View* TrayUserSeparator::CreateDefaultView(user::LoginStatus status) { 22 views::View* TrayUserSeparator::CreateDefaultView(user::LoginStatus status) {
23 if (status == user::LOGGED_IN_NONE) 23 if (status == user::LOGGED_IN_NONE)
24 return NULL; 24 return NULL;
25 25
26 const SessionStateDelegate* session_state_delegate = 26 const SessionStateDelegate* session_state_delegate =
27 Shell::GetInstance()->session_state_delegate(); 27 Shell::GetInstance()->session_state_delegate();
28 28
29 // If the screen is locked, a system modal dialog or a single user is shown, 29 // If the screen is locked, or only a single user is shown, show nothing.
30 // show nothing.
31 if (session_state_delegate->IsUserSessionBlocked() || 30 if (session_state_delegate->IsUserSessionBlocked() ||
32 Shell::GetInstance()->IsSystemModalWindowOpen() ||
33 session_state_delegate->NumberOfLoggedInUsers() < 2) 31 session_state_delegate->NumberOfLoggedInUsers() < 2)
34 return NULL; 32 return NULL;
35 33
36 separator_shown_ = true; 34 separator_shown_ = true;
37 return new views::View(); 35 return new views::View();
38 } 36 }
39 37
40 views::View* TrayUserSeparator::CreateDetailedView(user::LoginStatus status) { 38 views::View* TrayUserSeparator::CreateDetailedView(user::LoginStatus status) {
41 return NULL; 39 return NULL;
42 } 40 }
43 41
44 void TrayUserSeparator::DestroyDefaultView() { 42 void TrayUserSeparator::DestroyDefaultView() {
45 separator_shown_ = false; 43 separator_shown_ = false;
46 } 44 }
47 45
48 } // namespace ash 46 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698