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

Unified Diff: third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp

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
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_];
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBEndpoint.h ('k') | third_party/WebKit/Source/modules/webusb/USBInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698