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

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

Issue 1228863002: Runtime checks so that CoreBluetooth only used on >= 10.10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timeinfo
Patch Set: Scheib comments #2 Created 5 years, 5 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 <string> 10 #include <string>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void ClassicDiscoveryStopped(bool unexpected) override; 84 void ClassicDiscoveryStopped(bool unexpected) override;
85 85
86 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: 86 // BluetoothLowEnergyDiscoveryManagerMac::Observer override:
87 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, 87 void LowEnergyDeviceUpdated(CBPeripheral* peripheral,
88 NSDictionary* advertisementData, 88 NSDictionary* advertisementData,
89 int rssi) override; 89 int rssi) override;
90 90
91 // Registers that a new |device| has connected to the local host. 91 // Registers that a new |device| has connected to the local host.
92 void DeviceConnected(IOBluetoothDevice* device); 92 void DeviceConnected(IOBluetoothDevice* device);
93 93
94 // We only use CoreBluetooth when OS X >= 10.10. This because the
95 // CBCentralManager destructor was found to crash on the mac_chromium_rel_ng
96 // builder running 10.9.5. May also cause blued to crash on OS X 10.9.5
97 // (crbug.com/506287).
98 static bool IsLowEnergyAvailable();
99
94 protected: 100 protected:
95 // BluetoothAdapter override: 101 // BluetoothAdapter override:
96 void RemovePairingDelegateInternal( 102 void RemovePairingDelegateInternal(
97 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; 103 device::BluetoothDevice::PairingDelegate* pairing_delegate) override;
98 104
99 private: 105 private:
100 friend class BluetoothAdapterMacTest; 106 friend class BluetoothAdapterMacTest;
101 107
102 BluetoothAdapterMac(); 108 BluetoothAdapterMac();
103 ~BluetoothAdapterMac() override; 109 ~BluetoothAdapterMac() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 152 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
147 153
148 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; 154 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_;
149 155
150 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); 156 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac);
151 }; 157 };
152 158
153 } // namespace device 159 } // namespace device
154 160
155 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 161 #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_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698