| Index: third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp b/third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp
|
| index 8a71cda312f5327817fd7a2b86fb755630b6039e..16babb28925caa88079f488c1ae3a664ef2a4b6d 100644
|
| --- a/third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp
|
| +++ b/third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp
|
| @@ -9,18 +9,18 @@
|
| #include "device/usb/public/interfaces/device.mojom-blink.h"
|
| #include "modules/webusb/USBAlternateInterface.h"
|
|
|
| -using device::usb::blink::EndpointType;
|
| -using device::usb::blink::TransferDirection;
|
| +using device::mojom::blink::UsbEndpointType;
|
| +using device::mojom::blink::UsbTransferDirection;
|
|
|
| namespace blink {
|
|
|
| namespace {
|
|
|
| -String ConvertDirectionToEnum(const TransferDirection& direction) {
|
| +String ConvertDirectionToEnum(const UsbTransferDirection& direction) {
|
| switch (direction) {
|
| - case TransferDirection::INBOUND:
|
| + case UsbTransferDirection::INBOUND:
|
| return "in";
|
| - case TransferDirection::OUTBOUND:
|
| + case UsbTransferDirection::OUTBOUND:
|
| return "out";
|
| default:
|
| ASSERT_NOT_REACHED();
|
| @@ -28,13 +28,13 @@ String ConvertDirectionToEnum(const TransferDirection& direction) {
|
| }
|
| }
|
|
|
| -String ConvertTypeToEnum(const EndpointType& type) {
|
| +String ConvertTypeToEnum(const UsbEndpointType& type) {
|
| switch (type) {
|
| - case EndpointType::BULK:
|
| + case UsbEndpointType::BULK:
|
| return "bulk";
|
| - case EndpointType::INTERRUPT:
|
| + case UsbEndpointType::INTERRUPT:
|
| return "interrupt";
|
| - case EndpointType::ISOCHRONOUS:
|
| + case UsbEndpointType::ISOCHRONOUS:
|
| return "isochronous";
|
| default:
|
| ASSERT_NOT_REACHED();
|
| @@ -53,9 +53,9 @@ USBEndpoint* USBEndpoint::Create(const USBAlternateInterface* alternate,
|
| size_t endpoint_number,
|
| const String& direction,
|
| ExceptionState& exception_state) {
|
| - TransferDirection mojo_direction = direction == "in"
|
| - ? TransferDirection::INBOUND
|
| - : TransferDirection::OUTBOUND;
|
| + UsbTransferDirection mojo_direction = direction == "in"
|
| + ? UsbTransferDirection::INBOUND
|
| + : UsbTransferDirection::OUTBOUND;
|
| const auto& endpoints = alternate->Info().endpoints;
|
| for (size_t i = 0; i < endpoints.size(); ++i) {
|
| const auto& endpoint = endpoints[i];
|
| @@ -75,8 +75,8 @@ USBEndpoint::USBEndpoint(const USBAlternateInterface* alternate,
|
| ASSERT(endpoint_index_ < alternate_->Info().endpoints.size());
|
| }
|
|
|
| -const device::usb::blink::EndpointInfo& USBEndpoint::Info() const {
|
| - const device::usb::blink::AlternateInterfaceInfo& alternate_info =
|
| +const device::mojom::blink::UsbEndpointInfo& USBEndpoint::Info() const {
|
| + const device::mojom::blink::UsbAlternateInterfaceInfo& alternate_info =
|
| alternate_->Info();
|
| ASSERT(endpoint_index_ < alternate_info.endpoints.size());
|
| return *alternate_info.endpoints[endpoint_index_];
|
|
|