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