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

Side by Side Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 1929733002: Login Screen for Mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document disabled features Created 4 years, 7 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 | « no previous file | chrome/browser/chromeos/login/session/user_session_manager.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 "chrome/browser/chromeos/login/screens/user_selection_screen.h" 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 : handler_(nullptr), 117 : handler_(nullptr),
118 login_display_delegate_(nullptr), 118 login_display_delegate_(nullptr),
119 view_(nullptr), 119 view_(nullptr),
120 display_type_(display_type), 120 display_type_(display_type),
121 weak_factory_(this) { 121 weak_factory_(this) {
122 } 122 }
123 123
124 UserSelectionScreen::~UserSelectionScreen() { 124 UserSelectionScreen::~UserSelectionScreen() {
125 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(nullptr); 125 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(nullptr);
126 ui::UserActivityDetector* activity_detector = ui::UserActivityDetector::Get(); 126 ui::UserActivityDetector* activity_detector = ui::UserActivityDetector::Get();
127 if (activity_detector->HasObserver(this)) 127 if (activity_detector && activity_detector->HasObserver(this))
128 activity_detector->RemoveObserver(this); 128 activity_detector->RemoveObserver(this);
129 } 129 }
130 130
131 void UserSelectionScreen::InitEasyUnlock() { 131 void UserSelectionScreen::InitEasyUnlock() {
132 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(this); 132 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(this);
133 } 133 }
134 134
135 void UserSelectionScreen::SetLoginDisplayDelegate( 135 void UserSelectionScreen::SetLoginDisplayDelegate(
136 LoginDisplay::Delegate* login_display_delegate) { 136 LoginDisplay::Delegate* login_display_delegate) {
137 login_display_delegate_ = login_display_delegate; 137 login_display_delegate_ = login_display_delegate;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void UserSelectionScreen::SetView(UserBoardView* view) { 255 void UserSelectionScreen::SetView(UserBoardView* view) {
256 view_ = view; 256 view_ = view;
257 } 257 }
258 258
259 void UserSelectionScreen::Init(const user_manager::UserList& users, 259 void UserSelectionScreen::Init(const user_manager::UserList& users,
260 bool show_guest) { 260 bool show_guest) {
261 users_ = users; 261 users_ = users;
262 show_guest_ = show_guest; 262 show_guest_ = show_guest;
263 263
264 ui::UserActivityDetector* activity_detector = ui::UserActivityDetector::Get(); 264 ui::UserActivityDetector* activity_detector = ui::UserActivityDetector::Get();
265 if (!activity_detector->HasObserver(this)) 265 if (activity_detector && !activity_detector->HasObserver(this))
266 activity_detector->AddObserver(this); 266 activity_detector->AddObserver(this);
267 } 267 }
268 268
269 void UserSelectionScreen::OnBeforeUserRemoved(const AccountId& account_id) { 269 void UserSelectionScreen::OnBeforeUserRemoved(const AccountId& account_id) {
270 for (user_manager::UserList::iterator it = users_.begin(); it != users_.end(); 270 for (user_manager::UserList::iterator it = users_.begin(); it != users_.end();
271 ++it) { 271 ++it) {
272 if ((*it)->GetAccountId() == account_id) { 272 if ((*it)->GetAccountId() == account_id) {
273 users_.erase(it); 273 users_.erase(it);
274 break; 274 break;
275 } 275 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 // The user profile should exist if and only if this is the lock screen. 553 // The user profile should exist if and only if this is the lock screen.
554 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); 554 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN);
555 555
556 if (!profile) 556 if (!profile)
557 profile = profile_helper->GetSigninProfile(); 557 profile = profile_helper->GetSigninProfile();
558 558
559 return EasyUnlockService::Get(profile); 559 return EasyUnlockService::Get(profile);
560 } 560 }
561 561
562 } // namespace chromeos 562 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/session/user_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698