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_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ |
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // |user_email|: The email for the user associated with the profile to which | 56 // |user_email|: The email for the user associated with the profile to which |
57 // this class is attached. | 57 // this class is attached. |
58 // |initial_hardlock_state|: The initial hardlock state. | 58 // |initial_hardlock_state|: The initial hardlock state. |
59 // |screenlock_bridge|: The screenlock bridge used to update the screen lock | 59 // |screenlock_bridge|: The screenlock bridge used to update the screen lock |
60 // state. | 60 // state. |
61 EasyUnlockScreenlockStateHandler(const std::string& user_email, | 61 EasyUnlockScreenlockStateHandler(const std::string& user_email, |
62 HardlockState initial_hardlock_state, | 62 HardlockState initial_hardlock_state, |
63 ScreenlockBridge* screenlock_bridge); | 63 ScreenlockBridge* screenlock_bridge); |
64 virtual ~EasyUnlockScreenlockStateHandler(); | 64 virtual ~EasyUnlockScreenlockStateHandler(); |
65 | 65 |
| 66 // Returns true if handler is not in INACTIVE state. |
| 67 bool IsActive() const; |
| 68 |
66 // Changes internal state to |new_state| and updates the user's screenlock | 69 // Changes internal state to |new_state| and updates the user's screenlock |
67 // accordingly. | 70 // accordingly. |
68 void ChangeState(State new_state); | 71 void ChangeState(State new_state); |
69 | 72 |
70 // Updates the screenlock state. | 73 // Updates the screenlock state. |
71 void SetHardlockState(HardlockState new_state); | 74 void SetHardlockState(HardlockState new_state); |
72 | 75 |
73 // Shows the hardlock UI if the hardlock_state_ is not NO_HARDLOCK. | 76 // Shows the hardlock UI if the hardlock_state_ is not NO_HARDLOCK. |
74 void MaybeShowHardlockUI(); | 77 void MaybeShowHardlockUI(); |
75 | 78 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 113 |
111 // Whether this is the trial Easy Unlock run. If this is the case, a | 114 // Whether this is the trial Easy Unlock run. If this is the case, a |
112 // tutorial message should be shown and hard-locking be disabled. The trial | 115 // tutorial message should be shown and hard-locking be disabled. The trial |
113 // run should be set if the screen was locked by the Easy Unlock setup app. | 116 // run should be set if the screen was locked by the Easy Unlock setup app. |
114 bool is_trial_run_; | 117 bool is_trial_run_; |
115 | 118 |
116 DISALLOW_COPY_AND_ASSIGN(EasyUnlockScreenlockStateHandler); | 119 DISALLOW_COPY_AND_ASSIGN(EasyUnlockScreenlockStateHandler); |
117 }; | 120 }; |
118 | 121 |
119 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ | 122 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ |
OLD | NEW |