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

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

Issue 2242833002: Bluetooth: mac: add connected BLE devices at startup 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ADAPTER_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
7 7
8 #include <IOKit/IOReturn.h> 8 #include <IOKit/IOReturn.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 void ClassicDeviceAdded(IOBluetoothDevice* device); 170 void ClassicDeviceAdded(IOBluetoothDevice* device);
171 171
172 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: 172 // BluetoothLowEnergyDiscoveryManagerMac::Observer override:
173 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, 173 void LowEnergyDeviceUpdated(CBPeripheral* peripheral,
174 NSDictionary* advertisement_data, 174 NSDictionary* advertisement_data,
175 int rssi) override; 175 int rssi) override;
176 176
177 // Updates |devices_| when there is a change to the CBCentralManager's state. 177 // Updates |devices_| when there is a change to the CBCentralManager's state.
178 void LowEnergyCentralManagerUpdatedState(); 178 void LowEnergyCentralManagerUpdatedState();
179 179
180 // Updates |devices_| to include the currently paired devices and notifies 180 // Updates |devices_| to include the currently paired Bluetooth Classic
181 // observers. 181 // devices and notifies observers.
182 void AddPairedDevices(); 182 void AddPairedClassicDevices();
183
184 // Updates |devices_| to include the currently connected Bluetooth Low Energy
185 // devices and notifies observers.
186 void AddConnectedLowEnergyDevices();
183 187
184 // Returns the BLE device associated with the CoreBluetooth peripheral. 188 // Returns the BLE device associated with the CoreBluetooth peripheral.
185 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( 189 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac(
186 CBPeripheral* peripheral); 190 CBPeripheral* peripheral);
187 191
188 std::string address_; 192 std::string address_;
189 std::string name_; 193 std::string name_;
190 bool classic_powered_; 194 bool classic_powered_;
191 int num_discovery_sessions_; 195 int num_discovery_sessions_;
192 196
(...skipping 12 matching lines...) Expand all
205 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 209 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
206 210
207 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; 211 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_;
208 212
209 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); 213 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac);
210 }; 214 };
211 215
212 } // namespace device 216 } // namespace device
213 217
214 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 218 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | device/bluetooth/bluetooth_adapter_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698