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 DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ |
6 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ | 6 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 std::set<Transfer*> transfers_; | 142 std::set<Transfer*> transfers_; |
143 | 143 |
144 // A map from endpoints to interfaces | 144 // A map from endpoints to interfaces |
145 typedef std::map<int, int> EndpointMap; | 145 typedef std::map<int, int> EndpointMap; |
146 EndpointMap endpoint_map_; | 146 EndpointMap endpoint_map_; |
147 | 147 |
148 // Retain the UsbContext so that the platform context will not be destroyed | 148 // Retain the UsbContext so that the platform context will not be destroyed |
149 // before this handle. | 149 // before this handle. |
150 scoped_refptr<UsbContext> context_; | 150 scoped_refptr<UsbContext> context_; |
151 | 151 |
152 base::WeakPtrFactory<UsbDeviceHandleImpl> weak_factory_; | |
153 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 152 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
154 | 153 |
155 base::ThreadChecker thread_checker_; | 154 base::ThreadChecker thread_checker_; |
| 155 base::WeakPtrFactory<UsbDeviceHandleImpl> weak_factory_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); | 157 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); |
158 }; | 158 }; |
159 | 159 |
160 } // namespace device | 160 } // namespace device |
161 | 161 |
162 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ | 162 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ |
OLD | NEW |