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

Unified Diff: device/usb/usb_service_android.h

Issue 1514603006: Implement basic USB device enumeration on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address qinmin's comments. Created 4 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/usb/usb_interface_android.cc ('k') | device/usb/usb_service_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_android.h
diff --git a/device/usb/usb_service_android.h b/device/usb/usb_service_android.h
index d1ffd9dffaea52a8b6bf5f5faa196072022f289c..9cab43851716cbccbd4b31b58cf8896492ad0d89 100644
--- a/device/usb/usb_service_android.h
+++ b/device/usb/usb_service_android.h
@@ -5,6 +5,9 @@
#ifndef DEVICE_USB_USB_SERVICE_ANDROID_H_
#define DEVICE_USB_USB_SERVICE_ANDROID_H_
+#include <string>
+
+#include "base/android/scoped_java_ref.h"
#include "device/usb/usb_service.h"
namespace device {
@@ -13,11 +16,19 @@ namespace device {
// does not return any devices.
class UsbServiceAndroid : public UsbService {
public:
+ // Register C++ methods exposed to Java using JNI.
+ static bool RegisterJNI(JNIEnv* env);
+
UsbServiceAndroid();
~UsbServiceAndroid() override;
+ // UsbService:
scoped_refptr<UsbDevice> GetDevice(const std::string& guid) override;
void GetDevices(const GetDevicesCallback& callback) override;
+
+ private:
+ // Java object org.chromium.device.usb.ChromeUsbService.
+ base::android::ScopedJavaGlobalRef<jobject> j_object_;
};
} // namespace device
« no previous file with comments | « device/usb/usb_interface_android.cc ('k') | device/usb/usb_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698