Index: public/platform/WebBluetoothDevice.h |
diff --git a/public/platform/WebBluetoothDevice.h b/public/platform/WebBluetoothDevice.h |
index 32d79d248cc2ddb2310517aa33266ea3841fc53b..4015386fa025c353bf4b75b3e698584e918478e3 100644 |
--- a/public/platform/WebBluetoothDevice.h |
+++ b/public/platform/WebBluetoothDevice.h |
@@ -6,18 +6,66 @@ |
#define WebBluetoothDevice_h |
#include "WebString.h" |
+#include "WebVector.h" |
namespace blink { |
// Information describing a Bluetooth device provided by the platform. |
struct WebBluetoothDevice { |
- WebBluetoothDevice(const WebString& instanceId) |
- : instanceId(instanceId) |
+ enum class VendorIDSource { |
+ Unknown, |
+ Bluetooth, |
+ USB |
+ }; |
+ |
+ // FIXME: Remove after crrev.com/885723002 lands. |
+ WebBluetoothDevice(const WebString& instanceID) |
+ : instanceID(instanceID) |
+ , deviceClass(0) |
+ , vendorIDSource(VendorIDSource::Unknown) |
+ , vendorID(0) |
+ , productID(0) |
+ , productVersion(0) |
+ , paired(false) |
+ , connected(false) |
+ , uuids() |
+ { |
+ } |
+ |
+ WebBluetoothDevice(const WebString& instanceID, |
+ const WebString& name, |
+ int32_t deviceClass, |
+ VendorIDSource vendorIDSource, |
+ uint16_t vendorID, |
+ uint16_t productID, |
+ uint16_t productVersion, |
+ bool paired, |
+ bool connected, |
+ const WebVector<WebString>& uuids) |
+ : instanceID(instanceID) |
+ , name(name) |
+ , deviceClass(deviceClass) |
+ , vendorIDSource(vendorIDSource) |
+ , vendorID(vendorID) |
+ , productID(productID) |
+ , productVersion(productVersion) |
+ , paired(paired) |
+ , connected(connected) |
+ , uuids(uuids) |
{ |
} |
// Members corresponding to BluetoothDevice attributes as specified in IDL. |
- const WebString instanceId; |
+ const WebString instanceID; |
+ const WebString name; |
+ const int32_t deviceClass; |
+ const VendorIDSource vendorIDSource; |
+ const uint16_t vendorID; |
+ const uint16_t productID; |
+ const uint16_t productVersion; |
+ const bool paired; |
+ const bool connected; |
+ const WebVector<WebString> uuids; |
}; |
} // namespace blink |