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

Unified Diff: third_party/WebKit/Source/modules/webusb/USBConfiguration.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/USBConfiguration.h
diff --git a/third_party/WebKit/Source/modules/webusb/USBConfiguration.h b/third_party/WebKit/Source/modules/webusb/USBConfiguration.h
index 72299b031bd5624ca45a72c9a998fd74dd48f725..b753dc18f43defd87fe75f9684bd1a677316b6ef 100644
--- a/third_party/WebKit/Source/modules/webusb/USBConfiguration.h
+++ b/third_party/WebKit/Source/modules/webusb/USBConfiguration.h
@@ -6,8 +6,8 @@
#define USBConfiguration_h
#include "bindings/core/v8/ScriptWrappable.h"
+#include "device/usb/public/interfaces/device.mojom-wtf.h"
#include "platform/heap/Handle.h"
-#include "public/platform/modules/webusb/WebUSBDeviceInfo.h"
namespace blink {
@@ -22,16 +22,15 @@ class USBConfiguration
public:
static USBConfiguration* create(const USBDevice*, size_t configurationIndex);
static USBConfiguration* create(const USBDevice*, size_t configurationValue, ExceptionState&);
- static USBConfiguration* createFromValue(const USBDevice*, uint8_t configurationValue);
USBConfiguration(const USBDevice*, size_t configurationIndex);
const USBDevice* device() const;
size_t index() const;
- const WebUSBDeviceInfo::Configuration& info() const;
+ const device::usb::wtf::ConfigurationInfo& info() const;
- uint8_t configurationValue() const;
- String configurationName() const;
+ uint8_t configurationValue() const { return info().configuration_value; }
+ String configurationName() const { return info().configuration_name; }
HeapVector<Member<USBInterface>> interfaces() const;
DECLARE_TRACE();

Powered by Google App Engine
This is Rietveld 408576698