| 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 <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 11 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 15 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 16 #include "base/values.h" | 17 #include "base/values.h" |
| 17 | 18 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 166 |
| 166 void AddObserver(Observer* observer); | 167 void AddObserver(Observer* observer); |
| 167 void RemoveObserver(Observer* observer); | 168 void RemoveObserver(Observer* observer); |
| 168 | 169 |
| 169 LockHandler* lock_handler() { return lock_handler_; } | 170 LockHandler* lock_handler() { return lock_handler_; } |
| 170 | 171 |
| 171 std::string focused_user_id() const { return focused_user_id_; } | 172 std::string focused_user_id() const { return focused_user_id_; } |
| 172 | 173 |
| 173 private: | 174 private: |
| 174 friend struct base::DefaultLazyInstanceTraits<ScreenlockBridge>; | 175 friend struct base::DefaultLazyInstanceTraits<ScreenlockBridge>; |
| 175 friend struct base::DefaultDeleter<ScreenlockBridge>; | 176 friend std::default_delete<ScreenlockBridge>; |
| 176 | 177 |
| 177 ScreenlockBridge(); | 178 ScreenlockBridge(); |
| 178 ~ScreenlockBridge(); | 179 ~ScreenlockBridge(); |
| 179 | 180 |
| 180 LockHandler* lock_handler_; // Not owned | 181 LockHandler* lock_handler_; // Not owned |
| 181 | 182 |
| 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 |