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 COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
6 #define COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 6 #define COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 virtual void OnFocusedUserChanged(const std::string& user_id) = 0; | 149 virtual void OnFocusedUserChanged(const std::string& user_id) = 0; |
150 | 150 |
151 protected: | 151 protected: |
152 virtual ~Observer() {} | 152 virtual ~Observer() {} |
153 }; | 153 }; |
154 | 154 |
155 static ScreenlockBridge* Get(); | 155 static ScreenlockBridge* Get(); |
156 | 156 |
157 void SetLockHandler(LockHandler* lock_handler); | 157 void SetLockHandler(LockHandler* lock_handler); |
158 void SetFocusedUser(const std::string& user_id); | 158 void SetFocusedUser(const std::string& user_id); |
| 159 std::string GetFocusedUser(); |
159 | 160 |
160 bool IsLocked() const; | 161 bool IsLocked() const; |
161 void Lock(); | 162 void Lock(); |
162 | 163 |
163 // Unlocks the screen for the authenticated user with the given |user_email|. | 164 // Unlocks the screen for the authenticated user with the given |user_email|. |
164 void Unlock(const std::string& user_email); | 165 void Unlock(const std::string& user_email); |
165 | 166 |
166 void AddObserver(Observer* observer); | 167 void AddObserver(Observer* observer); |
167 void RemoveObserver(Observer* observer); | 168 void RemoveObserver(Observer* observer); |
168 | 169 |
(...skipping 13 matching lines...) Expand all Loading... |
182 // The last focused user's id. | 183 // The last focused user's id. |
183 std::string focused_user_id_; | 184 std::string focused_user_id_; |
184 base::ObserverList<Observer, true> observers_; | 185 base::ObserverList<Observer, true> observers_; |
185 | 186 |
186 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 187 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
187 }; | 188 }; |
188 | 189 |
189 } // namespace proximity_auth | 190 } // namespace proximity_auth |
190 | 191 |
191 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 192 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
OLD | NEW |