OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UNLOCK_MANAGER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_H |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 // Called when the user pod is clicked for an authentication attempt of type | 57 // Called when the user pod is clicked for an authentication attempt of type |
58 // |auth_type|. | 58 // |auth_type|. |
59 // Exposed for testing. | 59 // Exposed for testing. |
60 void OnAuthAttempted(ScreenlockBridge::LockHandler::AuthType auth_type); | 60 void OnAuthAttempted(ScreenlockBridge::LockHandler::AuthType auth_type); |
61 | 61 |
62 protected: | 62 protected: |
63 // Creates a ProximityMonitor instance for the given |remote_device|. | 63 // Creates a ProximityMonitor instance for the given |remote_device|. |
64 // Exposed for testing. | 64 // Exposed for testing. |
65 virtual std::unique_ptr<ProximityMonitor> CreateProximityMonitor( | 65 virtual std::unique_ptr<ProximityMonitor> CreateProximityMonitor( |
66 const RemoteDevice& remote_device); | 66 const cryptauth::RemoteDevice& remote_device); |
67 | 67 |
68 private: | 68 private: |
69 // The possible lock screen states for the remote device. | 69 // The possible lock screen states for the remote device. |
70 enum class RemoteScreenlockState { | 70 enum class RemoteScreenlockState { |
71 UNKNOWN, | 71 UNKNOWN, |
72 UNLOCKED, | 72 UNLOCKED, |
73 DISABLED, | 73 DISABLED, |
74 LOCKED, | 74 LOCKED, |
75 }; | 75 }; |
76 | 76 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 // Used to vend all other weak pointers. | 191 // Used to vend all other weak pointers. |
192 base::WeakPtrFactory<UnlockManager> weak_ptr_factory_; | 192 base::WeakPtrFactory<UnlockManager> weak_ptr_factory_; |
193 | 193 |
194 DISALLOW_COPY_AND_ASSIGN(UnlockManager); | 194 DISALLOW_COPY_AND_ASSIGN(UnlockManager); |
195 }; | 195 }; |
196 | 196 |
197 } // namespace proximity_auth | 197 } // namespace proximity_auth |
198 | 198 |
199 #endif // COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_H | 199 #endif // COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_H |
OLD | NEW |