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

Unified Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 1133173002: Expose TxPower for bluetooth devices during discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: device/bluetooth/bluetooth_device_chromeos.cc
diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc
index a1a2569e729096b32474fc3347e9f27e37529b4c..30b5379714ff9b96aa44208d455d94c9d2723acf 100644
--- a/device/bluetooth/bluetooth_device_chromeos.cc
+++ b/device/bluetooth/bluetooth_device_chromeos.cc
@@ -278,6 +278,18 @@ int16 BluetoothDeviceChromeOS::GetInquiryRSSI() const {
return properties->rssi.value();
}
+int16 BluetoothDeviceChromeOS::GetInquiryTxPower() const {
+ BluetoothDeviceClient::Properties* properties =
+ DBusThreadManager::Get()->GetBluetoothDeviceClient()->
+ GetProperties(object_path_);
+ DCHECK(properties);
+
+ if (!properties->tx_power.is_valid())
+ return kUnknownPower;
+
+ return properties->tx_power.value();
+}
+
bool BluetoothDeviceChromeOS::ExpectingPinCode() const {
return pairing_.get() && pairing_->ExpectingPinCode();
}

Powered by Google App Engine
This is Rietveld 408576698