| Index: device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| index 64b74920e18273b823a13b79b914ec2b474311de..98f4b729aa4dab106eb61b24ab654ffc949ff6b4 100644
|
| --- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| +++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| @@ -126,7 +126,7 @@ bool BluetoothLowEnergyDeviceMac::IsConnectable() const {
|
| }
|
|
|
| bool BluetoothLowEnergyDeviceMac::IsConnecting() const {
|
| - return false;
|
| + return (GetPeripheralState() == CBPeripheralStateConnecting);
|
| }
|
|
|
| BluetoothDevice::UUIDList BluetoothLowEnergyDeviceMac::GetUUIDs() const {
|
| @@ -212,12 +212,6 @@ void BluetoothLowEnergyDeviceMac::ConnectToServiceInsecurely(
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| -void BluetoothLowEnergyDeviceMac::CreateGattConnection(
|
| - const GattConnectionCallback& callback,
|
| - const ConnectErrorCallback& error_callback) {
|
| - NOTIMPLEMENTED();
|
| -}
|
| -
|
| NSDate* BluetoothLowEnergyDeviceMac::GetLastUpdateTime() const {
|
| return last_update_time_.get();
|
| }
|
| @@ -227,15 +221,19 @@ std::string BluetoothLowEnergyDeviceMac::GetDeviceName() const {
|
| }
|
|
|
| void BluetoothLowEnergyDeviceMac::CreateGattConnectionImpl() {
|
| - // Mac implementation does not yet use the default CreateGattConnection
|
| - // implementation. http://crbug.com/520774
|
| - NOTIMPLEMENTED();
|
| + BluetoothAdapterMac* adapter =
|
| + static_cast<BluetoothAdapterMac*>(this->adapter_);
|
| + adapter->CreateGattConnection(this);
|
| +}
|
| +
|
| +void BluetoothLowEnergyDeviceMac::GattConnected() {
|
| + this->DidConnectGatt();
|
| }
|
|
|
| void BluetoothLowEnergyDeviceMac::DisconnectGatt() {
|
| - // Mac implementation does not yet use the default CreateGattConnection
|
| - // implementation. http://crbug.com/520774
|
| - NOTIMPLEMENTED();
|
| + BluetoothAdapterMac* adapter =
|
| + static_cast<BluetoothAdapterMac*>(this->adapter_);
|
| + adapter->DisconnectGatt(this);
|
| }
|
|
|
| // static
|
|
|