| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class ScreenLockerTester; | 42 class ScreenLockerTester; |
| 43 class ScreenLockerViewsTester; | 43 class ScreenLockerViewsTester; |
| 44 class WebUIScreenLockerTester; | 44 class WebUIScreenLockerTester; |
| 45 } // namespace test | 45 } // namespace test |
| 46 | 46 |
| 47 // ScreenLocker creates a ScreenLockerDelegate which will display the lock UI. | 47 // ScreenLocker creates a ScreenLockerDelegate which will display the lock UI. |
| 48 // As well, it takes care of authenticating the user and managing a global | 48 // As well, it takes care of authenticating the user and managing a global |
| 49 // instance of itself which will be deleted when the system is unlocked. | 49 // instance of itself which will be deleted when the system is unlocked. |
| 50 class ScreenLocker : public AuthStatusConsumer { | 50 class ScreenLocker : public AuthStatusConsumer { |
| 51 public: | 51 public: |
| 52 enum UnlockSuccess { |
| 53 AUTH_SUCCESS_PASSWORD = 0, |
| 54 AUTH_SUCCESS_PIN, |
| 55 AUTH_SUCCESS_COUNT |
| 56 }; |
| 57 |
| 58 enum UnlockFailure { |
| 59 AUTH_FAILURE_PASSWORD = 0, |
| 60 AUTH_FAILURE_PIN, |
| 61 AUTH_FAILURE_COUNT |
| 62 }; |
| 63 |
| 52 explicit ScreenLocker(const user_manager::UserList& users); | 64 explicit ScreenLocker(const user_manager::UserList& users); |
| 53 | 65 |
| 54 // Returns the default instance if it has been created. | 66 // Returns the default instance if it has been created. |
| 55 static ScreenLocker* default_screen_locker() { | 67 static ScreenLocker* default_screen_locker() { |
| 56 return screen_locker_; | 68 return screen_locker_; |
| 57 } | 69 } |
| 58 | 70 |
| 59 bool locked() const { return locked_; } | 71 bool locked() const { return locked_; } |
| 60 | 72 |
| 61 // Initialize and show the screen locker. | 73 // Initialize and show the screen locker. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_; | 207 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_; |
| 196 | 208 |
| 197 base::WeakPtrFactory<ScreenLocker> weak_factory_; | 209 base::WeakPtrFactory<ScreenLocker> weak_factory_; |
| 198 | 210 |
| 199 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); | 211 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); |
| 200 }; | 212 }; |
| 201 | 213 |
| 202 } // namespace chromeos | 214 } // namespace chromeos |
| 203 | 215 |
| 204 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ | 216 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ |
| OLD | NEW |