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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 1685963003: Adding the last test related with connect/disconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@connectdisconnect
Patch Set: adding DEVICE_BLUETOOTH_EXPORT to BluetoothDeviceMac Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_low_energy_device_mac.h" 5 #include "device/bluetooth/bluetooth_low_energy_device_mac.h"
6 6
7 #import <CoreFoundation/CoreFoundation.h> 7 #import <CoreFoundation/CoreFoundation.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 device::BluetoothAdapterMac* BluetoothLowEnergyDeviceMac::GetMacAdapter() { 264 device::BluetoothAdapterMac* BluetoothLowEnergyDeviceMac::GetMacAdapter() {
265 return static_cast<BluetoothAdapterMac*>(this->adapter_); 265 return static_cast<BluetoothAdapterMac*>(this->adapter_);
266 } 266 }
267 267
268 CBPeripheral* BluetoothLowEnergyDeviceMac::GetPeripheral() { 268 CBPeripheral* BluetoothLowEnergyDeviceMac::GetPeripheral() {
269 return peripheral_; 269 return peripheral_;
270 } 270 }
271 271
272 void BluetoothLowEnergyDeviceMac::DidDisconnectPeripheral() { 272 void BluetoothLowEnergyDeviceMac::DidDisconnectPeripheral(
273 BluetoothDevice::ConnectErrorCode error_code) {
273 if (create_gatt_connection_error_callbacks_.empty()) { 274 if (create_gatt_connection_error_callbacks_.empty()) {
275 // TODO(http://crbug.com/585897): Need to pass the error.
274 DidDisconnectGatt(); 276 DidDisconnectGatt();
275 } else { 277 } else {
276 DidFailToConnectGatt(ERROR_FAILED); 278 DidFailToConnectGatt(error_code);
277 } 279 }
278 } 280 }
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.h ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698