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

Unified Diff: device/usb/mojo/device_impl.h

Issue 2821723002: Move classes in the device.usb Mojo namespace to device.mojom (Closed)
Patch Set: mcasas@ nits Created 3 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 | « chrome/browser/usb/web_usb_chooser_service.cc ('k') | device/usb/mojo/device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
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);
« no previous file with comments | « chrome/browser/usb/web_usb_chooser_service.cc ('k') | device/usb/mojo/device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698