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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.cc

Issue 2513323002: bluetooth: Include connected device in the chooser.
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/bluetooth_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index 809f3a15c4dae9f7ac5979aa7245be9cae87508d..3fbb599b3e7bf51a2b83334f7b07d90e2b6edc8d 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -343,6 +343,14 @@ void BluetoothDeviceChooserController::GetDevice(
}
PopulateConnectedDevices();
+ std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter =
+ ComputeScanFilter(options_->filters);
+ for (const std::pair<device::BluetoothDevice*,
+ device::BluetoothDevice::UUIDSet>& pair :
+ adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter(
+ *discovery_filter.get())) {
+ AddFilteredDevice(*pair.first);
+ }
if (!chooser_.get()) {
// If the dialog's closing, no need to do any of the rest of this.
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698