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

Unified Diff: device/usb/usb_device_impl.h

Issue 1877503003: Replace libusb in the Linux/Chrome OS USB I/O path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and addressed feedback. Created 4 years, 8 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_device_handle_usbfs.cc ('k') | device/usb/usb_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_impl.h
diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h
index aea9b54cec1d138cc5d6dc27b57e96a88f1a934f..a5f36bab018c9e3aebb0059faa0a353362c9dfc0 100644
--- a/device/usb/usb_device_impl.h
+++ b/device/usb/usb_device_impl.h
@@ -13,6 +13,7 @@
#include <utility>
#include "base/callback.h"
+#include "base/files/scoped_file.h"
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "build/build_config.h"
@@ -74,6 +75,7 @@ class UsbDeviceImpl : public UsbDevice {
protected:
friend class UsbServiceImpl;
friend class UsbDeviceHandleImpl;
+ friend class UsbDeviceHandleUsbfs;
// Called by UsbServiceImpl only;
UsbDeviceImpl(scoped_refptr<UsbContext> context,
@@ -90,7 +92,8 @@ class UsbDeviceImpl : public UsbDevice {
void ReadAllConfigurations();
// Called by UsbDeviceHandleImpl.
- void HandleClosed(scoped_refptr<UsbDeviceHandle> handle);
+ void HandleClosed(UsbDeviceHandle* handle);
+ void ActiveConfigurationChanged(int configuration_value);
void RefreshActiveConfiguration();
private:
@@ -103,10 +106,15 @@ class UsbDeviceImpl : public UsbDevice {
const std::string& error_message);
void OpenOnBlockingThreadWithFd(dbus::FileDescriptor fd,
const OpenCallback& callback);
-#endif
+#else
void OpenOnBlockingThread(const OpenCallback& callback);
+#endif // defined(OS_CHROMEOS)
+#if defined(OS_LINUX)
+ void Opened(base::ScopedFD fd, const OpenCallback& callback);
+#else
void Opened(PlatformUsbDeviceHandle platform_handle,
const OpenCallback& callback);
+#endif // defined(OS_LINUX)
base::ThreadChecker thread_checker_;
PlatformUsbDevice platform_device_;
« no previous file with comments | « device/usb/usb_device_handle_usbfs.cc ('k') | device/usb/usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698