Index: chrome/browser/usb/usb_device_handle.h |
diff --git a/chrome/browser/usb/usb_device_handle.h b/chrome/browser/usb/usb_device_handle.h |
index 54ed216050a9f27055ea08afb01df3ce8e65f215..e46ab19c167b5efe87f09a598bfcd78b9fba3e38 100644 |
--- a/chrome/browser/usb/usb_device_handle.h |
+++ b/chrome/browser/usb/usb_device_handle.h |
@@ -43,7 +43,6 @@ enum UsbTransferStatus { |
typedef base::Callback<void(UsbTransferStatus, scoped_refptr<net::IOBuffer>, |
size_t)> UsbTransferCallback; |
-typedef base::Callback<void(bool success)> UsbInterfaceCallback; |
// A UsbDevice wraps the platform's underlying representation of what a USB |
// device actually is, and provides accessors for performing many of the |
@@ -60,24 +59,19 @@ class UsbDeviceHandle : public base::RefCounted<UsbDeviceHandle> { |
PlatformUsbDeviceHandle handle() { return handle_; } |
- // Close the USB device and release the underlying platform device. |callback| |
- // is invoked after the device has been closed. |
- virtual void Close(const base::Callback<void()>& callback); |
+ // Close the USB device and release the underlying platform device. |
+ virtual void Close(); |
- virtual void ListInterfaces(UsbConfigDescriptor* config, |
- const UsbInterfaceCallback& callback); |
- |
- virtual void ClaimInterface(const int interface_number, |
- const UsbInterfaceCallback& callback); |
- |
- virtual void ReleaseInterface(const int interface_number, |
- const UsbInterfaceCallback& callback); |
- |
- virtual void SetInterfaceAlternateSetting( |
+ // Device manipulation operations. These methods are blocking. |
+ virtual bool ListInterfaces(UsbConfigDescriptor* config); |
+ virtual bool ClaimInterface(const int interface_number); |
+ virtual bool ReleaseInterface(const int interface_number); |
+ virtual bool SetInterfaceAlternateSetting( |
const int interface_number, |
- const int alternate_setting, |
- const UsbInterfaceCallback& callback); |
+ const int alternate_setting); |
+ virtual bool ResetDevice(); |
+ // Async IO. |
virtual void ControlTransfer(const UsbEndpointDirection direction, |
const TransferRequestType request_type, |
const TransferRecipient recipient, |
@@ -112,8 +106,6 @@ class UsbDeviceHandle : public base::RefCounted<UsbDeviceHandle> { |
const unsigned int timeout, |
const UsbTransferCallback& callback); |
- virtual void ResetDevice(const base::Callback<void(bool success)>& callback); |
- |
// Normal code should not call this function. It is called by the platform's |
// callback mechanism in such a way that it cannot be made private. Invokes |
// the callbacks associated with a given transfer, and removes it from the |