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

Side by Side 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, 10 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 unified diff | Download patch
« no previous file with comments | « Source/modules/bluetooth/BluetoothDevice.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebBluetoothDevice_h 5 #ifndef WebBluetoothDevice_h
6 #define WebBluetoothDevice_h 6 #define WebBluetoothDevice_h
7 7
8 #include "WebString.h" 8 #include "WebString.h"
9 #include "WebVector.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 // Information describing a Bluetooth device provided by the platform. 13 // Information describing a Bluetooth device provided by the platform.
13 struct WebBluetoothDevice { 14 struct WebBluetoothDevice {
14 WebBluetoothDevice(const WebString& instanceId) 15 enum class VendorIDSource {
15 : instanceId(instanceId) 16 Unknown,
17 Bluetooth,
18 USB
19 };
20
21 // FIXME: Remove after crrev.com/885723002 lands.
22 WebBluetoothDevice(const WebString& instanceID)
23 : instanceID(instanceID)
24 , deviceClass(0)
25 , vendorIDSource(VendorIDSource::Unknown)
26 , vendorID(0)
27 , productID(0)
28 , productVersion(0)
29 , paired(false)
30 , connected(false)
31 , uuids()
32 {
33 }
34
35 WebBluetoothDevice(const WebString& instanceID,
36 const WebString& name,
37 int32_t deviceClass,
38 VendorIDSource vendorIDSource,
39 uint16_t vendorID,
40 uint16_t productID,
41 uint16_t productVersion,
42 bool paired,
43 bool connected,
44 const WebVector<WebString>& uuids)
45 : instanceID(instanceID)
46 , name(name)
47 , deviceClass(deviceClass)
48 , vendorIDSource(vendorIDSource)
49 , vendorID(vendorID)
50 , productID(productID)
51 , productVersion(productVersion)
52 , paired(paired)
53 , connected(connected)
54 , uuids(uuids)
16 { 55 {
17 } 56 }
18 57
19 // Members corresponding to BluetoothDevice attributes as specified in IDL. 58 // Members corresponding to BluetoothDevice attributes as specified in IDL.
20 const WebString instanceId; 59 const WebString instanceID;
60 const WebString name;
61 const int32_t deviceClass;
62 const VendorIDSource vendorIDSource;
63 const uint16_t vendorID;
64 const uint16_t productID;
65 const uint16_t productVersion;
66 const bool paired;
67 const bool connected;
68 const WebVector<WebString> uuids;
21 }; 69 };
22 70
23 } // namespace blink 71 } // namespace blink
24 72
25 #endif // WebBluetoothDevice_h 73 #endif // WebBluetoothDevice_h
OLDNEW
« 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