| OLD | NEW |
| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const BluetoothAudioSink::ErrorCallback& error_callback) override; | 80 const BluetoothAudioSink::ErrorCallback& error_callback) override; |
| 81 void RegisterAdvertisement( | 81 void RegisterAdvertisement( |
| 82 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, | 82 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, |
| 83 const CreateAdvertisementCallback& callback, | 83 const CreateAdvertisementCallback& callback, |
| 84 const CreateAdvertisementErrorCallback& error_callback) override; | 84 const CreateAdvertisementErrorCallback& error_callback) override; |
| 85 | 85 |
| 86 // BluetoothDiscoveryManagerMac::Observer overrides: | 86 // BluetoothDiscoveryManagerMac::Observer overrides: |
| 87 void ClassicDeviceFound(IOBluetoothDevice* device) override; | 87 void ClassicDeviceFound(IOBluetoothDevice* device) override; |
| 88 void ClassicDiscoveryStopped(bool unexpected) override; | 88 void ClassicDiscoveryStopped(bool unexpected) override; |
| 89 | 89 |
| 90 // Registers that a new |device| has connected to the local host. | 90 // Registers that a new classic device has connected to the local host. |
| 91 void DeviceConnected(IOBluetoothDevice* device); | 91 void ClassicDeviceConnected(IOBluetoothDevice* device); |
| 92 | 92 |
| 93 // We only use CoreBluetooth when OS X >= 10.10. This because the | 93 // We only use CoreBluetooth when OS X >= 10.10. This because the |
| 94 // CBCentralManager destructor was found to crash on the mac_chromium_rel_ng | 94 // CBCentralManager destructor was found to crash on the mac_chromium_rel_ng |
| 95 // builder running 10.9.5. May also cause blued to crash on OS X 10.9.5 | 95 // builder running 10.9.5. May also cause blued to crash on OS X 10.9.5 |
| 96 // (crbug.com/506287). | 96 // (crbug.com/506287). |
| 97 static bool IsLowEnergyAvailable(); | 97 static bool IsLowEnergyAvailable(); |
| 98 | 98 |
| 99 // Resets |low_energy_central_manager_| to |central_manager| and sets | 99 // Resets |low_energy_central_manager_| to |central_manager| and sets |
| 100 // |low_energy_central_manager_delegate_| as the manager's delegate. Should | 100 // |low_energy_central_manager_delegate_| as the manager's delegate. Should |
| 101 // be called only when |IsLowEnergyAvailable()|. | 101 // be called only when |IsLowEnergyAvailable()|. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 178 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
| 179 | 179 |
| 180 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 180 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
| 181 | 181 |
| 182 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 182 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 } // namespace device | 185 } // namespace device |
| 186 | 186 |
| 187 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 187 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| OLD | NEW |