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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void Unlock(const AccountId& account_id); | 164 void Unlock(const AccountId& account_id); |
165 | 165 |
166 void AddObserver(Observer* observer); | 166 void AddObserver(Observer* observer); |
167 void RemoveObserver(Observer* observer); | 167 void RemoveObserver(Observer* observer); |
168 | 168 |
169 LockHandler* lock_handler() { return lock_handler_; } | 169 LockHandler* lock_handler() { return lock_handler_; } |
170 | 170 |
171 const AccountId& focused_account_id() const { return focused_account_id_; } | 171 const AccountId& focused_account_id() const { return focused_account_id_; } |
172 | 172 |
173 private: | 173 private: |
174 friend struct base::DefaultLazyInstanceTraits<ScreenlockBridge>; | 174 friend struct base::LazyInstanceTraitsBase<ScreenlockBridge>; |
175 friend std::default_delete<ScreenlockBridge>; | 175 friend std::default_delete<ScreenlockBridge>; |
176 | 176 |
177 ScreenlockBridge(); | 177 ScreenlockBridge(); |
178 ~ScreenlockBridge(); | 178 ~ScreenlockBridge(); |
179 | 179 |
180 LockHandler* lock_handler_; // Not owned | 180 LockHandler* lock_handler_; // Not owned |
181 | 181 |
182 // The last focused user's id. | 182 // The last focused user's id. |
183 AccountId focused_account_id_; | 183 AccountId focused_account_id_; |
184 base::ObserverList<Observer, true> observers_; | 184 base::ObserverList<Observer, true> observers_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 186 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
187 }; | 187 }; |
188 | 188 |
189 } // namespace proximity_auth | 189 } // namespace proximity_auth |
190 | 190 |
191 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 191 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
OLD | NEW |