Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: device/usb/usb_device_android.cc

Issue 1784733002: Track USB device configuration state in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink_open_state
Patch Set: Rebased. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/usb/usb_device_android.h ('k') | device/usb/usb_device_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « device/usb/usb_device_android.h ('k') | device/usb/usb_device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698