Chromium Code Reviews| Index: device/usb/mojo/device_impl.h |
| diff --git a/device/usb/mojo/device_impl.h b/device/usb/mojo/device_impl.h |
| index 60a7756bb434eb6b43c0d289d8263425895ba13b..02983cae5fed5bf388faf0fb4d951388078383a9 100644 |
| --- a/device/usb/mojo/device_impl.h |
| +++ b/device/usb/mojo/device_impl.h |
| @@ -27,16 +27,16 @@ class PermissionProvider; |
| // Implementation of the public Device interface. Instances of this class are |
| // constructed by DeviceManagerImpl and are strongly bound to their MessagePipe |
| // lifetime. |
| -class DeviceImpl : public Device, public device::UsbDevice::Observer { |
| +class DeviceImpl : public mojom::UsbDevice, public device::UsbDevice::Observer { |
| public: |
| - static void Create(scoped_refptr<UsbDevice> device, |
| + static void Create(scoped_refptr<device::UsbDevice> device, |
| base::WeakPtr<PermissionProvider> permission_provider, |
| - DeviceRequest request); |
| + mojom::UsbDeviceRequest request); |
| ~DeviceImpl() override; |
| private: |
| - DeviceImpl(scoped_refptr<UsbDevice> device, |
| + DeviceImpl(scoped_refptr<device::UsbDevice> device, |
| base::WeakPtr<PermissionProvider> permission_provider); |
| // Closes the device if it's open. This will always set |device_handle_| to |
| @@ -44,8 +44,9 @@ class DeviceImpl : public Device, public device::UsbDevice::Observer { |
| void CloseHandle(); |
| // Checks interface permissions for control transfers. |
| - bool HasControlTransferPermission(ControlTransferRecipient recipient, |
| - uint16_t index); |
| + bool HasControlTransferPermission( |
| + mojom::UsbControlTransferRecipient recipient, |
| + uint16_t index); |
| // Handles completion of an open request. |
| static void OnOpen(base::WeakPtr<DeviceImpl> device, |
| @@ -68,11 +69,11 @@ class DeviceImpl : public Device, public device::UsbDevice::Observer { |
| const SetInterfaceAlternateSettingCallback& callback) override; |
| void Reset(const ResetCallback& callback) override; |
| void ClearHalt(uint8_t endpoint, const ClearHaltCallback& callback) override; |
| - void ControlTransferIn(ControlTransferParamsPtr params, |
| + void ControlTransferIn(mojom::UsbControlTransferParamsPtr params, |
| uint32_t length, |
| uint32_t timeout, |
| const ControlTransferInCallback& callback) override; |
| - void ControlTransferOut(ControlTransferParamsPtr params, |
| + void ControlTransferOut(mojom::UsbControlTransferParamsPtr params, |
| const std::vector<uint8_t>& data, |
| uint32_t timeout, |
| const ControlTransferOutCallback& callback) override; |
| @@ -99,7 +100,7 @@ class DeviceImpl : public Device, public device::UsbDevice::Observer { |
| // device::UsbDevice::Observer implementation: |
| void OnDeviceRemoved(scoped_refptr<device::UsbDevice> device) override; |
| - const scoped_refptr<UsbDevice> device_; |
| + const scoped_refptr<device::UsbDevice> device_; |
|
mcasas
2017/04/14 22:00:46
device:: namespace indication shouldn't be needed?
Reilly Grant (use Gerrit)
2017/04/14 22:15:30
I scratched my head over this for a long time and
|
| base::WeakPtr<PermissionProvider> permission_provider_; |
| ScopedObserver<device::UsbDevice, device::UsbDevice::Observer> observer_; |
| @@ -107,7 +108,7 @@ class DeviceImpl : public Device, public device::UsbDevice::Observer { |
| // has been closed. |
| scoped_refptr<UsbDeviceHandle> device_handle_; |
| - mojo::StrongBindingPtr<Device> binding_; |
| + mojo::StrongBindingPtr<mojom::UsbDevice> binding_; |
| base::WeakPtrFactory<DeviceImpl> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(DeviceImpl); |