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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 2083423004: arc/bluetooth: plumb adapter discoverable timeout property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-discoverable-timeout
Patch Set: suggestions from rockot@ Created 4 years, 6 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 | « components/arc/bluetooth/arc_bluetooth_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/bluetooth/arc_bluetooth_bridge.cc
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.cc b/components/arc/bluetooth/arc_bluetooth_bridge.cc
index b17ea3c835159d42064efa96b22dca7b72202501..28c211147d2bc412c1a1ee50f04b8af37f1fcb87 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge.cc
+++ b/components/arc/bluetooth/arc_bluetooth_bridge.cc
@@ -82,7 +82,10 @@ ArcBluetoothBridge::~ArcBluetoothBridge() {
void ArcBluetoothBridge::OnAdapterInitialized(
scoped_refptr<BluetoothAdapter> adapter) {
- bluetooth_adapter_ = adapter;
+ // We can downcast here because we are always running on Chrome OS, and
+ // so our adapter uses BlueZ.
+ bluetooth_adapter_ =
+ static_cast<bluez::BluetoothAdapterBlueZ*>(adapter.get());
bluetooth_adapter_->AddObserver(this);
}
@@ -1185,7 +1188,7 @@ ArcBluetoothBridge::GetAdapterProperties(
if (type == mojom::BluetoothPropertyType::ALL ||
type == mojom::BluetoothPropertyType::ADAPTER_DISCOVERY_TIMEOUT) {
mojom::BluetoothPropertyPtr btp = mojom::BluetoothProperty::New();
- btp->set_discovery_timeout(120);
+ btp->set_discovery_timeout(bluetooth_adapter_->GetDiscoverableTimeout());
properties.push_back(std::move(btp));
}
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698