| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 DEVICE_U2F_U2F_HID_DEVICE_H_ | 5 #ifndef DEVICE_U2F_U2F_HID_DEVICE_H_ |
| 6 #define DEVICE_U2F_U2F_HID_DEVICE_H_ | 6 #define DEVICE_U2F_U2F_HID_DEVICE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 bool success, | 83 bool success, |
| 84 scoped_refptr<net::IOBuffer> buf, | 84 scoped_refptr<net::IOBuffer> buf, |
| 85 size_t size); | 85 size_t size); |
| 86 void OnWink(const WinkCallback& callback, | 86 void OnWink(const WinkCallback& callback, |
| 87 bool success, | 87 bool success, |
| 88 std::unique_ptr<U2fMessage> response); | 88 std::unique_ptr<U2fMessage> response); |
| 89 void ArmTimeout(const DeviceCallback& callback); | 89 void ArmTimeout(const DeviceCallback& callback); |
| 90 void OnTimeout(const DeviceCallback& callback); | 90 void OnTimeout(const DeviceCallback& callback); |
| 91 void OnDeviceTransact(bool success, | 91 void OnDeviceTransact(bool success, |
| 92 std::unique_ptr<U2fApduResponse> response); | 92 std::unique_ptr<U2fApduResponse> response); |
| 93 base::WeakPtr<U2fDevice> GetWeakPtr() override; |
| 93 | 94 |
| 94 State state_; | 95 State state_; |
| 95 base::CancelableClosure timeout_callback_; | 96 base::CancelableClosure timeout_callback_; |
| 96 std::list<std::pair<std::unique_ptr<U2fApduCommand>, DeviceCallback>> | 97 std::list<std::pair<std::unique_ptr<U2fApduCommand>, DeviceCallback>> |
| 97 pending_transactions_; | 98 pending_transactions_; |
| 98 scoped_refptr<HidDeviceInfo> device_info_; | 99 scoped_refptr<HidDeviceInfo> device_info_; |
| 99 scoped_refptr<HidConnection> connection_; | 100 scoped_refptr<HidConnection> connection_; |
| 100 base::WeakPtrFactory<U2fHidDevice> weak_factory_; | 101 base::WeakPtrFactory<U2fHidDevice> weak_factory_; |
| 101 | 102 |
| 102 DISALLOW_COPY_AND_ASSIGN(U2fHidDevice); | 103 DISALLOW_COPY_AND_ASSIGN(U2fHidDevice); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace device | 106 } // namespace device |
| 106 | 107 |
| 107 #endif // DEVICE_U2F_U2F_HID_DEVICE_H_ | 108 #endif // DEVICE_U2F_U2F_HID_DEVICE_H_ |
| OLD | NEW |