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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp

Issue 1427653003: bluetooth: Implement TxPower and RSSI of BluetoothAdvertisementData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Change PowerValueAdapter to int8_t Created 5 years, 1 month 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
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
index da50dfd47cc565450139071de4a04bef57c9b980..2129c9893c4731483c4d78dfacf402b381c8ca24 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
@@ -19,6 +19,8 @@ namespace blink {
BluetoothDevice::BluetoothDevice(PassOwnPtr<WebBluetoothDevice> webDevice)
: m_webDevice(webDevice)
+ , m_adData(BluetoothAdvertisingData::create(m_webDevice->txPower,
+ m_webDevice->rssi))
{
}
@@ -28,6 +30,11 @@ BluetoothDevice* BluetoothDevice::take(ScriptPromiseResolver*, PassOwnPtr<WebBlu
return new BluetoothDevice(webDevice);
}
+DEFINE_TRACE(BluetoothDevice)
+{
+ visitor->trace(m_adData);
+}
+
unsigned BluetoothDevice::deviceClass(bool& isNull)
{
isNull = false;

Powered by Google App Engine
This is Rietveld 408576698