| 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 #include "device/usb/usb_device_android.h" | 5 #include "device/usb/usb_device_android.h" |
| 6 | 6 |
| 7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 ConvertJavaStringToUTF16(env, manufacturer_string), | 45 ConvertJavaStringToUTF16(env, manufacturer_string), |
| 46 ConvertJavaStringToUTF16(env, product_string), | 46 ConvertJavaStringToUTF16(env, product_string), |
| 47 ConvertJavaStringToUTF16(env, serial_number), wrapper)); | 47 ConvertJavaStringToUTF16(env, serial_number), wrapper)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void UsbDeviceAndroid::Open(const OpenCallback& callback) { | 50 void UsbDeviceAndroid::Open(const OpenCallback& callback) { |
| 51 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 51 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
| 52 base::Bind(callback, nullptr)); | 52 base::Bind(callback, nullptr)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 const UsbConfigDescriptor* UsbDeviceAndroid::GetActiveConfiguration() { | 55 const UsbConfigDescriptor* UsbDeviceAndroid::GetActiveConfiguration() const { |
| 56 return nullptr; | 56 return nullptr; |
| 57 } | 57 } |
| 58 | 58 |
| 59 UsbDeviceAndroid::UsbDeviceAndroid(JNIEnv* env, | 59 UsbDeviceAndroid::UsbDeviceAndroid(JNIEnv* env, |
| 60 uint16_t vendor_id, | 60 uint16_t vendor_id, |
| 61 uint16_t product_id, | 61 uint16_t product_id, |
| 62 const base::string16& manufacturer_string, | 62 const base::string16& manufacturer_string, |
| 63 const base::string16& product_string, | 63 const base::string16& product_string, |
| 64 const base::string16& serial_number, | 64 const base::string16& serial_number, |
| 65 const JavaRef<jobject>& wrapper) | 65 const JavaRef<jobject>& wrapper) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 env, env->GetObjectArrayElement(interfaces.obj(), i)); | 97 env, env->GetObjectArrayElement(interfaces.obj(), i)); |
| 98 config.interfaces.push_back(UsbInterfaceAndroid::Convert(env, interface)); | 98 config.interfaces.push_back(UsbInterfaceAndroid::Convert(env, interface)); |
| 99 } | 99 } |
| 100 configurations_.push_back(config); | 100 configurations_.push_back(config); |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 | 103 |
| 104 UsbDeviceAndroid::~UsbDeviceAndroid() {} | 104 UsbDeviceAndroid::~UsbDeviceAndroid() {} |
| 105 | 105 |
| 106 } // namespace device | 106 } // namespace device |
| OLD | NEW |