| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 bool locked() const { return locked_; } | 59 bool locked() const { return locked_; } |
| 60 | 60 |
| 61 // Initialize and show the screen locker. | 61 // Initialize and show the screen locker. |
| 62 void Init(); | 62 void Init(); |
| 63 | 63 |
| 64 // AuthStatusConsumer: | 64 // AuthStatusConsumer: |
| 65 void OnAuthFailure(const chromeos::AuthFailure& error) override; | 65 void OnAuthFailure(const chromeos::AuthFailure& error) override; |
| 66 void OnAuthSuccess(const UserContext& user_context) override; | 66 void OnAuthSuccess(const UserContext& user_context) override; |
| 67 | 67 |
| 68 // Called when an account password (not PIN/quick unlock) has been used to |
| 69 // unlock the device. |
| 70 void OnPasswordAuthSuccess(const UserContext& user_context); |
| 71 |
| 68 // Does actual unlocking once authentication is successful and all blocking | 72 // Does actual unlocking once authentication is successful and all blocking |
| 69 // animations are done. | 73 // animations are done. |
| 70 void UnlockOnLoginSuccess(); | 74 void UnlockOnLoginSuccess(); |
| 71 | 75 |
| 72 // Authenticates the user with given |user_context|. | 76 // Authenticates the user with given |user_context|. |
| 73 void Authenticate(const UserContext& user_context); | 77 void Authenticate(const UserContext& user_context); |
| 74 | 78 |
| 75 // Close message bubble to clear error messages. | 79 // Close message bubble to clear error messages. |
| 76 void ClearErrors(); | 80 void ClearErrors(); |
| 77 | 81 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 139 |
| 136 // Sets the authenticator. | 140 // Sets the authenticator. |
| 137 void SetAuthenticator(Authenticator* authenticator); | 141 void SetAuthenticator(Authenticator* authenticator); |
| 138 | 142 |
| 139 // Called when the screen lock is ready. | 143 // Called when the screen lock is ready. |
| 140 void ScreenLockReady(); | 144 void ScreenLockReady(); |
| 141 | 145 |
| 142 // Called when screen locker is safe to delete. | 146 // Called when screen locker is safe to delete. |
| 143 static void ScheduleDeletion(); | 147 static void ScheduleDeletion(); |
| 144 | 148 |
| 145 // Returns true if |username| is found among logged in users. | 149 // Returns true if |account_id| is found among logged in users. |
| 146 bool IsUserLoggedIn(const std::string& username); | 150 bool IsUserLoggedIn(const AccountId& account_id) const; |
| 147 | 151 |
| 148 // Looks up user in unlock user list. | 152 // Looks up user in unlock user list. |
| 149 const user_manager::User* FindUnlockUser(const std::string& user_id); | 153 const user_manager::User* FindUnlockUser(const AccountId& account_id); |
| 150 | 154 |
| 151 // ScreenLockerDelegate instance in use. | 155 // ScreenLockerDelegate instance in use. |
| 152 std::unique_ptr<ScreenLockerDelegate> delegate_; | 156 std::unique_ptr<ScreenLockerDelegate> delegate_; |
| 153 | 157 |
| 154 // Users that can unlock the device. | 158 // Users that can unlock the device. |
| 155 user_manager::UserList users_; | 159 user_manager::UserList users_; |
| 156 | 160 |
| 157 // Used to authenticate the user to unlock. | 161 // Used to authenticate the user to unlock. |
| 158 scoped_refptr<Authenticator> authenticator_; | 162 scoped_refptr<Authenticator> authenticator_; |
| 159 | 163 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_; | 195 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_; |
| 192 | 196 |
| 193 base::WeakPtrFactory<ScreenLocker> weak_factory_; | 197 base::WeakPtrFactory<ScreenLocker> weak_factory_; |
| 194 | 198 |
| 195 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); | 199 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); |
| 196 }; | 200 }; |
| 197 | 201 |
| 198 } // namespace chromeos | 202 } // namespace chromeos |
| 199 | 203 |
| 200 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ | 204 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ |
| OLD | NEW |