OLD | NEW |
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 #include "WebVector.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 // Information describing a Bluetooth device provided by the platform. | 13 // Information describing a Bluetooth device provided by the platform. |
14 struct WebBluetoothDevice { | 14 struct WebBluetoothDevice { |
15 enum class VendorIDSource { | 15 enum class VendorIDSource { |
16 Unknown, | 16 Unknown, |
17 Bluetooth, | 17 Bluetooth, |
18 USB | 18 USB |
19 }; | 19 }; |
20 | 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, | 21 WebBluetoothDevice(const WebString& instanceID, |
36 const WebString& name, | 22 const WebString& name, |
37 int32_t deviceClass, | 23 int32_t deviceClass, |
38 VendorIDSource vendorIDSource, | 24 VendorIDSource vendorIDSource, |
39 uint16_t vendorID, | 25 uint16_t vendorID, |
40 uint16_t productID, | 26 uint16_t productID, |
41 uint16_t productVersion, | 27 uint16_t productVersion, |
42 bool paired, | 28 bool paired, |
43 bool connected, | 29 bool connected, |
44 const WebVector<WebString>& uuids) | 30 const WebVector<WebString>& uuids) |
(...skipping 19 matching lines...) Expand all Loading... |
64 const uint16_t productID; | 50 const uint16_t productID; |
65 const uint16_t productVersion; | 51 const uint16_t productVersion; |
66 const bool paired; | 52 const bool paired; |
67 const bool connected; | 53 const bool connected; |
68 const WebVector<WebString> uuids; | 54 const WebVector<WebString> uuids; |
69 }; | 55 }; |
70 | 56 |
71 } // namespace blink | 57 } // namespace blink |
72 | 58 |
73 #endif // WebBluetoothDevice_h | 59 #endif // WebBluetoothDevice_h |
OLD | NEW |