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

Unified Diff: public/platform/WebBluetoothDevice.h

Issue 882223002: bluetooth: Add more attributes to WebBluetoothDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@gclient
Patch Set: addressed comment Created 5 years, 11 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 | « Source/modules/bluetooth/BluetoothDevice.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/modules/bluetooth/BluetoothDevice.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698