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

Side by Side Diff: ash/system/user/tray_user.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/tray/system_tray.cc ('k') | ash/system/user/tray_user_separator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "ash/system/user/tray_user.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/session/session_state_delegate.h" 9 #include "ash/session/session_state_delegate.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 UpdateAfterLoginStatusChange(status); 86 UpdateAfterLoginStatusChange(status);
87 return layout_view_; 87 return layout_view_;
88 } 88 }
89 89
90 views::View* TrayUser::CreateDefaultView(user::LoginStatus status) { 90 views::View* TrayUser::CreateDefaultView(user::LoginStatus status) {
91 if (status == user::LOGGED_IN_NONE) 91 if (status == user::LOGGED_IN_NONE)
92 return NULL; 92 return NULL;
93 const SessionStateDelegate* session_state_delegate = 93 const SessionStateDelegate* session_state_delegate =
94 Shell::GetInstance()->session_state_delegate(); 94 Shell::GetInstance()->session_state_delegate();
95 95
96 // If the screen is locked or a system modal dialog box is shown, show only 96 // If the screen is locked show only the currently active user.
97 // the currently active user. 97 if (multiprofile_index_ && session_state_delegate->IsUserSessionBlocked())
98 if (multiprofile_index_ &&
99 (session_state_delegate->IsUserSessionBlocked() ||
100 Shell::GetInstance()->IsSystemModalWindowOpen()))
101 return NULL; 98 return NULL;
102 99
103 CHECK(user_ == NULL); 100 CHECK(user_ == NULL);
104 101
105 int logged_in_users = session_state_delegate->NumberOfLoggedInUsers(); 102 int logged_in_users = session_state_delegate->NumberOfLoggedInUsers();
106 103
107 // Do not show more UserView's then there are logged in users. 104 // Do not show more UserView's then there are logged in users.
108 if (multiprofile_index_ >= logged_in_users) 105 if (multiprofile_index_ >= logged_in_users)
109 return NULL; 106 return NULL;
110 107
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void TrayUser::UpdateLayoutOfItem() { 287 void TrayUser::UpdateLayoutOfItem() {
291 RootWindowController* controller = GetRootWindowController( 288 RootWindowController* controller = GetRootWindowController(
292 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); 289 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow());
293 if (controller && controller->shelf()) { 290 if (controller && controller->shelf()) {
294 UpdateAfterShelfAlignmentChange( 291 UpdateAfterShelfAlignmentChange(
295 controller->GetShelfLayoutManager()->GetAlignment()); 292 controller->GetShelfLayoutManager()->GetAlignment());
296 } 293 }
297 } 294 }
298 295
299 } // namespace ash 296 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/user/tray_user_separator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698