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

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

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.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
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 "device/usb/usb_device.h" 9 #include "device/usb/usb_device.h"
10 10
11 namespace device { 11 namespace device {
12 12
13 class UsbDeviceAndroid : public UsbDevice { 13 class UsbDeviceAndroid : public UsbDevice {
14 public: 14 public:
15 // Register C++ methods exposed to Java using JNI. 15 // Register C++ methods exposed to Java using JNI.
16 static bool RegisterJNI(JNIEnv* env); 16 static bool RegisterJNI(JNIEnv* env);
17 17
18 static scoped_refptr<UsbDeviceAndroid> Create( 18 static scoped_refptr<UsbDeviceAndroid> Create(
19 JNIEnv* env, 19 JNIEnv* env,
20 const base::android::JavaRef<jobject>& usb_device); 20 const base::android::JavaRef<jobject>& usb_device);
21 21
22 // UsbDevice: 22 // UsbDevice:
23 void Open(const OpenCallback& callback) override; 23 void Open(const OpenCallback& callback) override;
24 const UsbConfigDescriptor* GetActiveConfiguration() override; 24 const UsbConfigDescriptor* GetActiveConfiguration() const override;
25 25
26 private: 26 private:
27 UsbDeviceAndroid(JNIEnv* env, 27 UsbDeviceAndroid(JNIEnv* env,
28 uint16_t vendor_id, 28 uint16_t vendor_id,
29 uint16_t product_id, 29 uint16_t product_id,
30 const base::string16& manufacturer_string, 30 const base::string16& manufacturer_string,
31 const base::string16& product_string, 31 const base::string16& product_string,
32 const base::string16& serial_number, 32 const base::string16& serial_number,
33 const base::android::JavaRef<jobject>& wrapper); 33 const base::android::JavaRef<jobject>& wrapper);
34 ~UsbDeviceAndroid() override; 34 ~UsbDeviceAndroid() override;
35 35
36 // Java object org.chromium.device.usb.ChromeUsbDevice. 36 // Java object org.chromium.device.usb.ChromeUsbDevice.
37 base::android::ScopedJavaGlobalRef<jobject> j_object_; 37 base::android::ScopedJavaGlobalRef<jobject> j_object_;
38 }; 38 };
39 39
40 } // namespace device 40 } // namespace device
41 41
42 #endif // DEVICE_USB_USB_DEVICE_ANDROID_H_ 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