| 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 "public/platform/WebString.h" | 8 #include "public/platform/WebString.h" |
| 9 #include "public/platform/WebVector.h" | 9 #include "public/platform/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 WebBluetoothDevice(const WebString& id, | 15 WebBluetoothDevice(const WebString& id, |
| 16 const WebString& name, | 16 const WebString& name, |
| 17 int8_t txPower, | |
| 18 int8_t rssi, | |
| 19 const WebVector<WebString>& uuids) | 17 const WebVector<WebString>& uuids) |
| 20 : id(id) | 18 : id(id) |
| 21 , name(name) | 19 , name(name) |
| 22 , txPower(txPower) | |
| 23 , rssi(rssi) | |
| 24 , uuids(uuids) | 20 , uuids(uuids) |
| 25 { | 21 { |
| 26 } | 22 } |
| 27 | 23 |
| 28 // Members corresponding to BluetoothDevice attributes as specified in IDL. | 24 // Members corresponding to BluetoothDevice attributes as specified in IDL. |
| 29 const WebString id; | 25 const WebString id; |
| 30 const WebString name; | 26 const WebString name; |
| 31 // Powers: | |
| 32 // A value of 127 denotes an invalid power. | |
| 33 const int8_t txPower; | |
| 34 const int8_t rssi; | |
| 35 const WebVector<WebString> uuids; | 27 const WebVector<WebString> uuids; |
| 36 }; | 28 }; |
| 37 | 29 |
| 38 } // namespace blink | 30 } // namespace blink |
| 39 | 31 |
| 40 #endif // WebBluetoothDevice_h | 32 #endif // WebBluetoothDevice_h |
| OLD | NEW |