Index: device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm |
diff --git a/device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm b/device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm |
index 598e4b97bcf70a177ce756c6a909519117f2a7e4..95e452c9c6399bd8a37e62c67180bf7f5ba13816 100644 |
--- a/device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm |
+++ b/device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm |
@@ -33,6 +33,20 @@ class BluetoothLowEnergyCentralManagerBridge { |
adapter_->LowEnergyCentralManagerUpdatedState(); |
} |
+ virtual void DidConnectPeripheral(CBPeripheral* peripheral) { |
+ adapter_->DidConnectPeripheral(peripheral); |
+ } |
+ |
+ virtual void DidFailToConnectPeripheral(CBPeripheral* peripheral, |
+ NSError* error) { |
+ adapter_->DidFailToConnectPeripheral(peripheral, error); |
+ } |
+ |
+ virtual void DidDisconnectPeripheral(CBPeripheral* peripheral, |
+ NSError* error) { |
+ adapter_->DidDisconnectPeripheral(peripheral, error); |
+ } |
+ |
private: |
BluetoothLowEnergyDiscoveryManagerMac* discovery_manager_; |
BluetoothAdapterMac* adapter_; |
@@ -65,4 +79,21 @@ class BluetoothLowEnergyCentralManagerBridge { |
bridge_->UpdatedState(); |
} |
+- (void)centralManager:(CBCentralManager*)central |
+ didConnectPeripheral:(CBPeripheral*)peripheral { |
+ bridge_->DidConnectPeripheral(peripheral); |
+} |
+ |
+- (void)centralManager:(CBCentralManager*)central |
+ didFailToConnectPeripheral:(CBPeripheral*)peripheral |
+ error:(nullable NSError*)error { |
+ bridge_->DidFailToConnectPeripheral(peripheral, error); |
+} |
+ |
+- (void)centralManager:(CBCentralManager*)central |
+ didDisconnectPeripheral:(CBPeripheral*)peripheral |
+ error:(nullable NSError*)error { |
+ bridge_->DidDisconnectPeripheral(peripheral, error); |
+} |
+ |
@end |