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(); | |
160 | 159 |
161 bool IsLocked() const; | 160 bool IsLocked() const; |
162 void Lock(); | 161 void Lock(); |
163 | 162 |
164 // Unlocks the screen for the authenticated user with the given |user_email|. | 163 // Unlocks the screen for the authenticated user with the given |user_email|. |
165 void Unlock(const std::string& user_email); | 164 void Unlock(const std::string& user_email); |
166 | 165 |
167 void AddObserver(Observer* observer); | 166 void AddObserver(Observer* observer); |
168 void RemoveObserver(Observer* observer); | 167 void RemoveObserver(Observer* observer); |
169 | 168 |
(...skipping 13 matching lines...) Expand all Loading... |
183 // The last focused user's id. | 182 // The last focused user's id. |
184 std::string focused_user_id_; | 183 std::string focused_user_id_; |
185 base::ObserverList<Observer, true> observers_; | 184 base::ObserverList<Observer, true> observers_; |
186 | 185 |
187 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 186 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
188 }; | 187 }; |
189 | 188 |
190 } // namespace proximity_auth | 189 } // namespace proximity_auth |
191 | 190 |
192 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 191 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
OLD | NEW |