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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevice.h

Issue 1427653003: bluetooth: Implement TxPower and RSSI of BluetoothAdvertisementData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Address scheib's comments Created 5 years, 2 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 | « third_party/WebKit/Source/modules/modules.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevice.h
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevice.h b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevice.h
index 76534e50ab788a1dc1b188c173d24b1dfdb227c5..7cd59448439d4095b2cc85e830616fc0a787269d 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevice.h
+++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevice.h
@@ -20,6 +20,8 @@ struct WebBluetoothDevice {
WebBluetoothDevice(const WebString& id,
const WebString& name,
+ int txPower,
+ int rssi,
int32_t deviceClass,
VendorIDSource vendorIDSource,
uint16_t vendorID,
@@ -29,6 +31,8 @@ struct WebBluetoothDevice {
const WebVector<WebString>& uuids)
: id(id)
, name(name)
+ , txPower(txPower)
+ , rssi(rssi)
, deviceClass(deviceClass)
, vendorIDSource(vendorIDSource)
, vendorID(vendorID)
@@ -42,6 +46,13 @@ struct WebBluetoothDevice {
// Members corresponding to BluetoothDevice attributes as specified in IDL.
const WebString id;
const WebString name;
+ // Powers:
+ // In practice these values should be between [-127, 20], but since the
+ // since the underlying platform uses int16 rather than int8 blink turns
scheib 2015/10/29 20:59:13 I don't think the int16 reference makes much sense
+ // values smaller than INT8_MIN or larger than INT8_MAX into INT8_MAX. A
+ // value of INT8_MAX denotes an invalid power.
+ const int txPower;
+ const int rssi;
const int32_t deviceClass;
const VendorIDSource vendorIDSource;
const uint16_t vendorID;
« no previous file with comments | « third_party/WebKit/Source/modules/modules.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698