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

Unified Diff: device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm

Issue 1276353005: Planned implementation of CreateGattConnection Base URL: https://chromium.googlesource.com/chromium/src.git@adapimpl-simple
Patch Set: Created 5 years, 4 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_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..c8a72261950cffb04bb726fca035a409df4e8416 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 DidConnectPeripheralError(CBPeripheral* peripheral,
+ NSError* error) {
+ adapter_->DidConnectPeripheralError(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:(NSError*)error {
+ bridge_->DidConnectPeripheralError(peripheral, error);
+}
+
+- (void)centralManager:(CBCentralManager*)central
+ didDisconnectPeripheral:(CBPeripheral*)peripheral
+ error:(NSError*)error {
+ bridge_->DidDisconnectPeripheral(peripheral, error);
+}
+
@end
« no previous file with comments | « device/bluetooth/bluetooth_gatt_connection_mac.mm ('k') | device/bluetooth/bluetooth_low_energy_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698