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

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

Issue 2911493002: cros: Pull user info from session_controller_client.mojom into separate mojom. (Closed)
Patch Set: Fix ordering in typemaps Created 3 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
« no previous file with comments | « ash/system/user/user_card_view.cc ('k') | ash/test/test_session_controller_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/user_view.h" 5 #include "ash/system/user/user_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // |user_index| must be in range (0, number_of_user). Note 0 is excluded 59 // |user_index| must be in range (0, number_of_user). Note 0 is excluded
60 // because it represents the active user and SwitchUser should not be called 60 // because it represents the active user and SwitchUser should not be called
61 // for such case. 61 // for such case.
62 DCHECK_GT(user_index, 0); 62 DCHECK_GT(user_index, 0);
63 DCHECK_LT(user_index, controller->NumberOfLoggedInUsers()); 63 DCHECK_LT(user_index, controller->NumberOfLoggedInUsers());
64 64
65 MultiProfileUMA::RecordSwitchActiveUser( 65 MultiProfileUMA::RecordSwitchActiveUser(
66 MultiProfileUMA::SWITCH_ACTIVE_USER_BY_TRAY); 66 MultiProfileUMA::SWITCH_ACTIVE_USER_BY_TRAY);
67 controller->SwitchActiveUser( 67 controller->SwitchActiveUser(
68 controller->GetUserSession(user_index)->account_id); 68 controller->GetUserSession(user_index)->user_info->account_id);
69 } 69 }
70 70
71 bool IsMultiProfileSupportedAndUserActive() { 71 bool IsMultiProfileSupportedAndUserActive() {
72 return Shell::Get()->shell_delegate()->IsMultiProfilesEnabled() && 72 return Shell::Get()->shell_delegate()->IsMultiProfilesEnabled() &&
73 !Shell::Get()->session_controller()->IsUserSessionBlocked(); 73 !Shell::Get()->session_controller()->IsUserSessionBlocked();
74 } 74 }
75 75
76 // Creates the view shown in the user switcher popup ("AddUserMenuOption"). 76 // Creates the view shown in the user switcher popup ("AddUserMenuOption").
77 views::View* CreateAddUserView(AddUserSessionPolicy policy) { 77 views::View* CreateAddUserView(AddUserSessionPolicy policy) {
78 auto* view = new views::View; 78 auto* view = new views::View;
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 focus_manager_->RemoveFocusChangeListener(this); 415 focus_manager_->RemoveFocusChangeListener(this);
416 focus_manager_ = nullptr; 416 focus_manager_ = nullptr;
417 if (user_card_container_->GetFocusManager()) 417 if (user_card_container_->GetFocusManager())
418 user_card_container_->GetFocusManager()->ClearFocus(); 418 user_card_container_->GetFocusManager()->ClearFocus();
419 user_card_view_->SetSuppressCaptureIcon(false); 419 user_card_view_->SetSuppressCaptureIcon(false);
420 user_dropdown_widget_.reset(); 420 user_dropdown_widget_.reset();
421 } 421 }
422 422
423 } // namespace tray 423 } // namespace tray
424 } // namespace ash 424 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/user_card_view.cc ('k') | ash/test/test_session_controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698