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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 1538173003: Implementing GATT connection/disconnect on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sorting methods between bluetooth_adapter_mac.h and bluetooth_adapter_mac.mm Created 4 years, 10 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_adapter_mac.h
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index 472c2f9bd104fc65cdf9e53719324d8612bc1069..7811bbbf6b3611abccc3fe8ef5a1785d139898ba 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -97,16 +97,28 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// (crbug.com/506287).
static bool IsLowEnergyAvailable();
- // Resets |low_energy_central_manager_| to |central_manager| and sets
- // |low_energy_central_manager_delegate_| as the manager's delegate. Should
- // be called only when |IsLowEnergyAvailable()|.
- void SetCentralManagerForTesting(CBCentralManager* central_manager);
+ // Creates a GATT connection by calling CoreBluetooth APIs.
+ void CreateGattConnection(BluetoothLowEnergyDeviceMac* device_mac);
+
+ // Close the GATT connection by calling CoreBluetooth APIs.
scheib 2016/02/10 18:59:45 Closes https://google.github.io/styleguide/cppguid
jlebel 2016/02/10 21:20:07 Done.
+ void DisconnectGatt(BluetoothLowEnergyDeviceMac* device_mac);
+
+ // Methods called from CBCentralManager delegate.
+ void DidConnectPeripheral(CBPeripheral* peripheral);
+ void DidFailToConnectPeripheral(CBPeripheral* peripheral, NSError* error);
+ void DidDisconnectPeripheral(CBPeripheral* peripheral, NSError* error);
protected:
// BluetoothAdapter override:
void RemovePairingDelegateInternal(
device::BluetoothDevice::PairingDelegate* pairing_delegate) override;
+ // Resets |low_energy_central_manager_| to |central_manager| and sets
+ // |low_energy_central_manager_delegate_| as the manager's delegate. Should
+ // be called only when |IsLowEnergyAvailable()|.
+ void SetCentralManagerForTesting(CBCentralManager* central_manager);
+ CBCentralManager* GetCentralManagerForTesting();
+
private:
// The length of time that must elapse since the last Inquiry response (on
// Classic devices) or call to BluetoothLowEnergyDevice::Update() (on Low

Powered by Google App Engine
This is Rietveld 408576698