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

Unified Diff: public/platform/modules/webusb/WebUSBDeviceFilter.h

Issue 1262163003: Add WebUSB bindings and client interface [part 1] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Handle null navigator.frame() without ASSERT Created 5 years, 5 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 | « public/platform/modules/webusb/WebUSBDeviceEnumerationOptions.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/modules/webusb/WebUSBDeviceFilter.h
diff --git a/public/platform/modules/webusb/WebUSBDeviceFilter.h b/public/platform/modules/webusb/WebUSBDeviceFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..117cd1c49150b77fc02ae8d791e9248fd4988a61
--- /dev/null
+++ b/public/platform/modules/webusb/WebUSBDeviceFilter.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebUSBDeviceFilter_h
+#define WebUSBDeviceFilter_h
+
+#include "public/platform/WebCommon.h"
+
+namespace blink {
+
+// Filter which specifies what devices the API consumer wants to enumerate.
+// Properties which are not present in a filter should be treated as wildcards.
+struct WebUSBDeviceFilter {
+ WebUSBDeviceFilter() {}
+
+ // Members corresponding to USBDeviceFilter properties specified in the IDL.
+ uint16_t vendorID;
+ uint16_t productID;
+ uint8_t classCode;
+ uint8_t subclassCode;
+ uint8_t protocolCode;
+
+ // Presence flags for each of the above properties.
+ bool hasVendorID : 1;
+ bool hasProductID : 1;
+ bool hasClassCode : 1;
+ bool hasSubclassCode : 1;
+ bool hasProtocolCode : 1;
+};
+
+} // namespace blink
+
+#endif // WebUSBDeviceFilter_h
« no previous file with comments | « public/platform/modules/webusb/WebUSBDeviceEnumerationOptions.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698