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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Nit for the tests 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 | « device/bluetooth/bluetooth_adapter.cc ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_mac.h
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index f1dcaec7244700fa54a090438bf861b325862c63..2dd3a3f53fed836bec4bd2810d6fbf1c3fe7949d 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -70,6 +70,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
const base::Closure& callback,
const ErrorCallback& error_callback) override;
bool IsDiscovering() const override;
+ std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet>
+ RetrieveGattConnectedDevicesWithDiscoveryFilter(
+ const BluetoothDiscoveryFilter& discovery_filter) override;
UUIDList GetUUIDs() const override;
void CreateRfcommService(
const BluetoothUUID& uuid,
@@ -176,10 +179,20 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// observers.
void AddPairedDevices();
+ // Returns the list of devices that are connected by other applications than
+ // Chromium, based on a service UUID. If no uuid is given, generic access
+ // service (1800) is used (since CoreBluetooth requires to use a service).
+ std::vector<BluetoothDevice*> RetrieveGattConnectedDevicesWithService(
+ const BluetoothUUID* uuid);
+
// Returns the BLE device associated with the CoreBluetooth peripheral.
BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac(
CBPeripheral* peripheral);
+ // Returns true if a new device collides with an existing device.
+ bool DoesCollideWithKnownDevice(CBPeripheral* peripheral,
+ BluetoothLowEnergyDeviceMac* device_mac);
+
std::string address_;
bool classic_powered_;
int num_discovery_sessions_;
« no previous file with comments | « device/bluetooth/bluetooth_adapter.cc ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698