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

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

Issue 2235313004: Revert of Bluetooth: mac: Crash while loging nil error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
7 7
8 #if defined(OS_IOS) 8 #if defined(OS_IOS)
9 #import <CoreBluetooth/CoreBluetooth.h> 9 #import <CoreBluetooth/CoreBluetooth.h>
10 #else // !defined(OS_IOS) 10 #else // !defined(OS_IOS)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 BluetoothAdapterMac* GetMacAdapter(); 120 BluetoothAdapterMac* GetMacAdapter();
121 121
122 // Returns the CoreBluetooth Peripheral. 122 // Returns the CoreBluetooth Peripheral.
123 CBPeripheral* GetPeripheral(); 123 CBPeripheral* GetPeripheral();
124 124
125 // Returns BluetoothRemoteGattServiceMac based on the CBService. 125 // Returns BluetoothRemoteGattServiceMac based on the CBService.
126 BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattService( 126 BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattService(
127 CBService* service) const; 127 CBService* service) const;
128 128
129 // Callback used when the CoreBluetooth Peripheral is disconnected. 129 // Callback used when the CoreBluetooth Peripheral is disconnected.
130 void DidDisconnectPeripheral(); 130 void DidDisconnectPeripheral(BluetoothDevice::ConnectErrorCode error_code);
131 131
132 // CoreBluetooth data structure. 132 // CoreBluetooth data structure.
133 base::scoped_nsobject<CBPeripheral> peripheral_; 133 base::scoped_nsobject<CBPeripheral> peripheral_;
134 134
135 // Objective-C delegate for the CBPeripheral. 135 // Objective-C delegate for the CBPeripheral.
136 base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate> 136 base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate>
137 peripheral_delegate_; 137 peripheral_delegate_;
138 138
139 // RSSI value. 139 // RSSI value.
140 int rssi_; 140 int rssi_;
141 141
142 // Whether the device is connectable. 142 // Whether the device is connectable.
143 bool connectable_; 143 bool connectable_;
144 144
145 // The peripheral's identifier, as returned by [CBPeripheral identifier]. 145 // The peripheral's identifier, as returned by [CBPeripheral identifier].
146 std::string identifier_; 146 std::string identifier_;
147 147
148 // A local address for the device created by hashing the peripheral 148 // A local address for the device created by hashing the peripheral
149 // identifier. 149 // identifier.
150 std::string hash_address_; 150 std::string hash_address_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); 152 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
153 }; 153 };
154 154
155 } // namespace device 155 } // namespace device
156 156
157 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 157 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698