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 DEVICE_USB_USB_DEVICE_ANDROID_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_ANDROID_H_ |
6 #define DEVICE_USB_USB_DEVICE_ANDROID_H_ | 6 #define DEVICE_USB_USB_DEVICE_ANDROID_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "device/usb/usb_device.h" | 10 #include "device/usb/usb_device.h" |
11 | 11 |
| 12 namespace base { |
| 13 class SequencedTaskRunner; |
| 14 } |
| 15 |
12 namespace device { | 16 namespace device { |
13 | 17 |
14 class UsbServiceAndroid; | 18 class UsbServiceAndroid; |
15 | 19 |
16 class UsbDeviceAndroid : public UsbDevice { | 20 class UsbDeviceAndroid : public UsbDevice { |
17 public: | 21 public: |
18 static scoped_refptr<UsbDeviceAndroid> Create( | 22 static scoped_refptr<UsbDeviceAndroid> Create( |
19 JNIEnv* env, | 23 JNIEnv* env, |
20 base::WeakPtr<UsbServiceAndroid> service, | 24 base::WeakPtr<UsbServiceAndroid> service, |
21 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, | 25 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 std::list<ResultCallback> request_permission_callbacks_; | 68 std::list<ResultCallback> request_permission_callbacks_; |
65 base::WeakPtr<UsbServiceAndroid> service_; | 69 base::WeakPtr<UsbServiceAndroid> service_; |
66 | 70 |
67 // Java object org.chromium.device.usb.ChromeUsbDevice. | 71 // Java object org.chromium.device.usb.ChromeUsbDevice. |
68 base::android::ScopedJavaGlobalRef<jobject> j_object_; | 72 base::android::ScopedJavaGlobalRef<jobject> j_object_; |
69 }; | 73 }; |
70 | 74 |
71 } // namespace device | 75 } // namespace device |
72 | 76 |
73 #endif // DEVICE_USB_USB_DEVICE_ANDROID_H_ | 77 #endif // DEVICE_USB_USB_DEVICE_ANDROID_H_ |
OLD | NEW |