Chromium Code Reviews| Index: chrome/browser/chromeos/login/screens/user_selection_screen.h |
| diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.h b/chrome/browser/chromeos/login/screens/user_selection_screen.h |
| index e6a5b80bb56cb172758a376256010264bb37b0b6..f28abfab7a6e9554279106d4fee4f681542a88f3 100644 |
| --- a/chrome/browser/chromeos/login/screens/user_selection_screen.h |
| +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.h |
| @@ -13,9 +13,9 @@ |
| #include "base/macros.h" |
| #include "base/timer/timer.h" |
| #include "base/values.h" |
| +#include "chrome/browser/chromeos/login/screens/base_screen.h" |
| #include "chrome/browser/chromeos/login/signin/token_handle_util.h" |
| #include "chrome/browser/chromeos/login/ui/login_display.h" |
| -#include "chrome/browser/chromeos/login/ui/models/user_board_model.h" |
| #include "components/proximity_auth/screenlock_bridge.h" |
| #include "components/signin/core/account_id/account_id.h" |
| #include "components/user_manager/user.h" |
| @@ -33,7 +33,7 @@ class UserBoardView; |
| class UserSelectionScreen |
| : public ui::UserActivityObserver, |
| public proximity_auth::ScreenlockBridge::LockHandler, |
| - public UserBoardModel { |
| + public BaseScreen { |
| public: |
| explicit UserSelectionScreen(const std::string& display_type); |
| ~UserSelectionScreen() override; |
| @@ -57,6 +57,14 @@ class UserSelectionScreen |
| void HandleGetUsers(); |
| void CheckUserStatus(const AccountId& account_id); |
| + // Build list of users and send it to the webui. |
| + virtual void SendUserList(); |
| + |
| + // Methods for easy unlock support. |
| + void HardLockPod(const AccountId& account_id); |
| + void AttemptEasyUnlock(const AccountId& account_id); |
| + void RecordClickOnLockIcon(const AccountId& account_id); |
| + |
| // ui::UserActivityDetector implementation: |
| void OnUserActivity(const ui::Event* event) override; |
| @@ -82,11 +90,9 @@ class UserSelectionScreen |
| const std::string& secret, |
| const std::string& key_label) override; |
| - // UserBoardModel implementation. |
| - void SendUserList() override; |
| - void HardLockPod(const AccountId& account_id) override; |
| - void AttemptEasyUnlock(const AccountId& account_id) override; |
| - void RecordClickOnLockIcon(const AccountId& account_id) override; |
| + // BaseScreen implementation: |
| + void Show() override; |
| + void Hide() override; |
| // Fills |user_dict| with information about |user|. |
| static void FillUserDictionary( |
| @@ -110,9 +116,9 @@ class UserSelectionScreen |
| static bool ShouldForceOnlineSignIn(const user_manager::User* user); |
| protected: |
| - LoginDisplayWebUIHandler* handler_; |
| - LoginDisplay::Delegate* login_display_delegate_; |
| - UserBoardView* view_; |
| + LoginDisplayWebUIHandler* handler_ = nullptr; |
|
jdufault
2017/02/07 00:15:22
I believe handler_ and login_display_delegate_ can
achuithb
2017/02/07 00:28:42
Acknowledged.
|
| + LoginDisplay::Delegate* login_display_delegate_ = nullptr; |
| + UserBoardView* view_ = nullptr; |
| // Map from public session account IDs to recommended locales set by policy. |
| typedef std::map<AccountId, std::vector<std::string> > |
|
achuithb
2017/02/07 00:28:43
Also switch to using since you're here?
jdufault
2017/02/08 00:58:42
Done.
|
| @@ -127,7 +133,7 @@ class UserSelectionScreen |
| TokenHandleUtil::TokenHandleStatus status); |
| // Whether to show guest login. |
| - bool show_guest_; |
| + bool show_guest_ = false; |
| // Purpose of the screen (see constants in OobeUI). |
| const std::string display_type_; |