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

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_display.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
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/ui/webui_login_display.h" 5 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
10 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 10 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 webui_handler_(NULL), 44 webui_handler_(NULL),
45 gaia_screen_(new GaiaScreen()), 45 gaia_screen_(new GaiaScreen()),
46 user_selection_screen_(new UserSelectionScreen()) { 46 user_selection_screen_(new UserSelectionScreen()) {
47 } 47 }
48 48
49 void WebUILoginDisplay::ClearAndEnablePassword() { 49 void WebUILoginDisplay::ClearAndEnablePassword() {
50 if (webui_handler_) 50 if (webui_handler_)
51 webui_handler_->ClearAndEnablePassword(); 51 webui_handler_->ClearAndEnablePassword();
52 } 52 }
53 53
54 void WebUILoginDisplay::Init(const UserList& users, 54 void WebUILoginDisplay::Init(const user_manager::UserList& users,
55 bool show_guest, 55 bool show_guest,
56 bool show_users, 56 bool show_users,
57 bool show_new_user) { 57 bool show_new_user) {
58 // Testing that the delegate has been set. 58 // Testing that the delegate has been set.
59 DCHECK(delegate_); 59 DCHECK(delegate_);
60 60
61 user_selection_screen_->Init(users, show_guest); 61 user_selection_screen_->Init(users, show_guest);
62 show_guest_ = show_guest; 62 show_guest_ = show_guest;
63 show_users_ = show_users; 63 show_users_ = show_users;
64 show_new_user_ = show_new_user; 64 show_new_user_ = show_new_user;
65 65
66 wm::UserActivityDetector* activity_detector = ash::Shell::GetInstance()-> 66 wm::UserActivityDetector* activity_detector = ash::Shell::GetInstance()->
67 user_activity_detector(); 67 user_activity_detector();
68 if (!activity_detector->HasObserver(this)) 68 if (!activity_detector->HasObserver(this))
69 activity_detector->AddObserver(this); 69 activity_detector->AddObserver(this);
70 } 70 }
71 71
72 // ---- Common methods 72 // ---- Common methods
73 73
74 // ---- User selection screen methods 74 // ---- User selection screen methods
75 75
76 void WebUILoginDisplay::OnBeforeUserRemoved(const std::string& username) { 76 void WebUILoginDisplay::OnBeforeUserRemoved(const std::string& username) {
77 user_selection_screen_->OnBeforeUserRemoved(username); 77 user_selection_screen_->OnBeforeUserRemoved(username);
78 } 78 }
79 79
80 void WebUILoginDisplay::OnUserRemoved(const std::string& username) { 80 void WebUILoginDisplay::OnUserRemoved(const std::string& username) {
81 user_selection_screen_->OnUserRemoved(username); 81 user_selection_screen_->OnUserRemoved(username);
82 } 82 }
83 83
84 void WebUILoginDisplay::OnUserImageChanged(const User& user) { 84 void WebUILoginDisplay::OnUserImageChanged(const user_manager::User& user) {
85 user_selection_screen_->OnUserImageChanged(user); 85 user_selection_screen_->OnUserImageChanged(user);
86 } 86 }
87 87
88 void WebUILoginDisplay::HandleGetUsers() { 88 void WebUILoginDisplay::HandleGetUsers() {
89 user_selection_screen_->HandleGetUsers(); 89 user_selection_screen_->HandleGetUsers();
90 } 90 }
91 91
92 const UserList& WebUILoginDisplay::GetUsers() const { 92 const user_manager::UserList& WebUILoginDisplay::GetUsers() const {
93 return user_selection_screen_->GetUsers(); 93 return user_selection_screen_->GetUsers();
94 } 94 }
95 95
96 // User selection screen, screen lock API 96 // User selection screen, screen lock API
97 97
98 void WebUILoginDisplay::SetAuthType( 98 void WebUILoginDisplay::SetAuthType(
99 const std::string& username, 99 const std::string& username,
100 ScreenlockBridge::LockHandler::AuthType auth_type) { 100 ScreenlockBridge::LockHandler::AuthType auth_type) {
101 user_selection_screen_->SetAuthType(username, auth_type); 101 user_selection_screen_->SetAuthType(username, auth_type);
102 } 102 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 delegate_->Signout(); 344 delegate_->Signout();
345 } 345 }
346 346
347 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { 347 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) {
348 if (delegate_) 348 if (delegate_)
349 delegate_->ResetPublicSessionAutoLoginTimer(); 349 delegate_->ResetPublicSessionAutoLoginTimer();
350 } 350 }
351 351
352 352
353 } // namespace chromeos 353 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_display.h ('k') | chrome/browser/chromeos/login/user_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698