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

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

Issue 1565313002: Reland of Implement basic USB device enumeration on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dependency fix added to reland. Created 4 years, 11 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.h ('k') | device/usb/usb_device_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_USB_USB_DEVICE_ANDROID_H_
6 #define DEVICE_USB_USB_DEVICE_ANDROID_H_
7
8 #include "base/android/scoped_java_ref.h"
9 #include "device/usb/usb_device.h"
10
11 namespace device {
12
13 class UsbDeviceAndroid : public UsbDevice {
14 public:
15 // Register C++ methods exposed to Java using JNI.
16 static bool RegisterJNI(JNIEnv* env);
17
18 static scoped_refptr<UsbDeviceAndroid> Create(
19 JNIEnv* env,
20 const base::android::JavaRef<jobject>& usb_device);
21
22 // UsbDevice:
23 void Open(const OpenCallback& callback) override;
24 const UsbConfigDescriptor* GetActiveConfiguration() override;
25
26 private:
27 UsbDeviceAndroid(JNIEnv* env,
28 uint16_t vendor_id,
29 uint16_t product_id,
30 const base::string16& manufacturer_string,
31 const base::string16& product_string,
32 const base::string16& serial_number,
33 const base::android::JavaRef<jobject>& wrapper);
34 ~UsbDeviceAndroid() override;
35
36 // Java object org.chromium.device.usb.ChromeUsbDevice.
37 base::android::ScopedJavaGlobalRef<jobject> j_object_;
38 };
39
40 } // namespace device
41
42 #endif // DEVICE_USB_USB_DEVICE_ANDROID_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device.h ('k') | device/usb/usb_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698