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

Unified Diff: third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h

Issue 1850023002: Consume Mojo services directly in Blink's WebUSB implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't do assignments in if statements. Created 4 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/USBAlternateInterface.h
diff --git a/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h b/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h
index 17d4d4c5cef434cb62e04233f4f2f3ba183c7baf..d6c49e13a5da3e1e772c9c3c24380ed3365056a2 100644
--- a/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h
+++ b/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h
@@ -6,8 +6,8 @@
#define USBAlternateInterface_h
#include "bindings/core/v8/ScriptWrappable.h"
+#include "device/usb/public/interfaces/device.mojom-wtf.h"
#include "platform/heap/Heap.h"
-#include "public/platform/modules/webusb/WebUSBDeviceInfo.h"
namespace blink {
@@ -25,13 +25,13 @@ public:
USBAlternateInterface(const USBInterface*, size_t alternateIndex);
- const WebUSBDeviceInfo::AlternateInterface& info() const;
+ const device::usb::wtf::AlternateInterfaceInfo& info() const;
- uint8_t alternateSetting() const;
- uint8_t interfaceClass() const;
- uint8_t interfaceSubclass() const;
- uint8_t interfaceProtocol() const;
- String interfaceName() const;
+ uint8_t alternateSetting() const { return info().alternate_setting; }
+ uint8_t interfaceClass() const { return info().class_code; }
+ uint8_t interfaceSubclass() const { return info().subclass_code; }
+ uint8_t interfaceProtocol() const { return info().protocol_code; }
+ String interfaceName() const { return info().interface_name; }
HeapVector<Member<USBEndpoint>> endpoints() const;
DECLARE_TRACE();
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USB.cpp ('k') | third_party/WebKit/Source/modules/webusb/USBAlternateInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698