| OLD | NEW |
| 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_MOJO_DEVICE_IMPL_H_ | 5 #ifndef DEVICE_USB_MOJO_DEVICE_IMPL_H_ |
| 6 #define DEVICE_USB_MOJO_DEVICE_IMPL_H_ | 6 #define DEVICE_USB_MOJO_DEVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Checks interface permissions for control transfers. | 48 // Checks interface permissions for control transfers. |
| 49 bool HasControlTransferPermission(ControlTransferRecipient recipient, | 49 bool HasControlTransferPermission(ControlTransferRecipient recipient, |
| 50 uint16_t index); | 50 uint16_t index); |
| 51 | 51 |
| 52 // Handles completion of an open request. | 52 // Handles completion of an open request. |
| 53 void OnOpen(const OpenCallback& callback, | 53 void OnOpen(const OpenCallback& callback, |
| 54 scoped_refptr<device::UsbDeviceHandle> handle); | 54 scoped_refptr<device::UsbDeviceHandle> handle); |
| 55 | 55 |
| 56 // Device implementation: | 56 // Device implementation: |
| 57 void GetDeviceInfo(const GetDeviceInfoCallback& callback) override; | 57 void GetDeviceInfo(const GetDeviceInfoCallback& callback) override; |
| 58 void GetConfiguration(const GetConfigurationCallback& callback) override; | |
| 59 void Open(const OpenCallback& callback) override; | 58 void Open(const OpenCallback& callback) override; |
| 60 void Close(const CloseCallback& callback) override; | 59 void Close(const CloseCallback& callback) override; |
| 61 void SetConfiguration(uint8_t value, | 60 void SetConfiguration(uint8_t value, |
| 62 const SetConfigurationCallback& callback) override; | 61 const SetConfigurationCallback& callback) override; |
| 63 void ClaimInterface(uint8_t interface_number, | 62 void ClaimInterface(uint8_t interface_number, |
| 64 const ClaimInterfaceCallback& callback) override; | 63 const ClaimInterfaceCallback& callback) override; |
| 65 void ReleaseInterface(uint8_t interface_number, | 64 void ReleaseInterface(uint8_t interface_number, |
| 66 const ReleaseInterfaceCallback& callback) override; | 65 const ReleaseInterfaceCallback& callback) override; |
| 67 void SetInterfaceAlternateSetting( | 66 void SetInterfaceAlternateSetting( |
| 68 uint8_t interface_number, | 67 uint8_t interface_number, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 mojo::Binding<Device> binding_; | 112 mojo::Binding<Device> binding_; |
| 114 base::WeakPtrFactory<DeviceImpl> weak_factory_; | 113 base::WeakPtrFactory<DeviceImpl> weak_factory_; |
| 115 | 114 |
| 116 DISALLOW_COPY_AND_ASSIGN(DeviceImpl); | 115 DISALLOW_COPY_AND_ASSIGN(DeviceImpl); |
| 117 }; | 116 }; |
| 118 | 117 |
| 119 } // namespace usb | 118 } // namespace usb |
| 120 } // namespace device | 119 } // namespace device |
| 121 | 120 |
| 122 #endif // DEVICE_USB_MOJO_DEVICE_IMPL_H_ | 121 #endif // DEVICE_USB_MOJO_DEVICE_IMPL_H_ |
| OLD | NEW |