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_IMPL_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_IMPL_H |
6 #define COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_IMPL_H | 6 #define COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_IMPL_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // The |proximity_auth_client| is not owned and should outlive the constructed | 43 // The |proximity_auth_client| is not owned and should outlive the constructed |
44 // unlock manager. | 44 // unlock manager. |
45 UnlockManagerImpl(ProximityAuthSystem::ScreenlockType screenlock_type, | 45 UnlockManagerImpl(ProximityAuthSystem::ScreenlockType screenlock_type, |
46 ProximityAuthClient* proximity_auth_client); | 46 ProximityAuthClient* proximity_auth_client); |
47 ~UnlockManagerImpl() override; | 47 ~UnlockManagerImpl() override; |
48 | 48 |
49 // UnlockManager: | 49 // UnlockManager: |
50 bool IsUnlockAllowed() override; | 50 bool IsUnlockAllowed() override; |
51 void SetRemoteDeviceLifeCycle(RemoteDeviceLifeCycle* life_cycle) override; | 51 void SetRemoteDeviceLifeCycle(RemoteDeviceLifeCycle* life_cycle) override; |
52 void OnLifeCycleStateChanged() override; | 52 void OnLifeCycleStateChanged() override; |
53 void OnAuthAttempted( | 53 void OnAuthAttempted(mojom::AuthType auth_type) override; |
54 ScreenlockBridge::LockHandler::AuthType auth_type) override; | |
55 | 54 |
56 protected: | 55 protected: |
57 // Creates a ProximityMonitor instance for the given |connection|. | 56 // Creates a ProximityMonitor instance for the given |connection|. |
58 // Exposed for testing. | 57 // Exposed for testing. |
59 virtual std::unique_ptr<ProximityMonitor> CreateProximityMonitor( | 58 virtual std::unique_ptr<ProximityMonitor> CreateProximityMonitor( |
60 cryptauth::Connection* connection); | 59 cryptauth::Connection* connection); |
61 | 60 |
62 private: | 61 private: |
63 // The possible lock screen states for the remote device. | 62 // The possible lock screen states for the remote device. |
64 enum class RemoteScreenlockState { | 63 enum class RemoteScreenlockState { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 187 |
189 // Used to vend all other weak pointers. | 188 // Used to vend all other weak pointers. |
190 base::WeakPtrFactory<UnlockManagerImpl> weak_ptr_factory_; | 189 base::WeakPtrFactory<UnlockManagerImpl> weak_ptr_factory_; |
191 | 190 |
192 DISALLOW_COPY_AND_ASSIGN(UnlockManagerImpl); | 191 DISALLOW_COPY_AND_ASSIGN(UnlockManagerImpl); |
193 }; | 192 }; |
194 | 193 |
195 } // namespace proximity_auth | 194 } // namespace proximity_auth |
196 | 195 |
197 #endif // COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_IMPL_H | 196 #endif // COMPONENTS_PROXIMITY_AUTH_UNLOCK_MANAGER_IMPL_H |
OLD | NEW |