| 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 #include "device/bluetooth/bluetooth_adapter_mac.h" | 5 #include "device/bluetooth/bluetooth_adapter_mac.h" |
| 6 | 6 |
| 7 #import <IOBluetooth/objc/IOBluetoothDevice.h> | 7 #import <IOBluetooth/objc/IOBluetoothDevice.h> |
| 8 #import <IOBluetooth/objc/IOBluetoothHostController.h> | 8 #import <IOBluetooth/objc/IOBluetoothHostController.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (unexpected) { | 200 if (unexpected) { |
| 201 DVLOG(1) << "Discovery stopped unexpectedly"; | 201 DVLOG(1) << "Discovery stopped unexpectedly"; |
| 202 num_discovery_sessions_ = 0; | 202 num_discovery_sessions_ = 0; |
| 203 MarkDiscoverySessionsAsInactive(); | 203 MarkDiscoverySessionsAsInactive(); |
| 204 } | 204 } |
| 205 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, | 205 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, |
| 206 observers_, | 206 observers_, |
| 207 AdapterDiscoveringChanged(this, false)); | 207 AdapterDiscoveringChanged(this, false)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void BluetoothAdapterMac::DeviceConnected(IOBluetoothDevice* device) { | 210 void BluetoothAdapterMac::ClassicDeviceConnected(IOBluetoothDevice* device) { |
| 211 // TODO(isherman): Investigate whether this method can be replaced with a call | 211 // TODO(isherman): Investigate whether this method can be replaced with a call |
| 212 // to +registerForConnectNotifications:selector:. | 212 // to +registerForConnectNotifications:selector:. |
| 213 DVLOG(1) << "Adapter registered a new connection from device with address: " | 213 DVLOG(1) << "Adapter registered a new connection from device with address: " |
| 214 << BluetoothClassicDeviceMac::GetDeviceAddress(device); | 214 << BluetoothClassicDeviceMac::GetDeviceAddress(device); |
| 215 ClassicDeviceAdded(device); | 215 ClassicDeviceAdded(device); |
| 216 } | 216 } |
| 217 | 217 |
| 218 // static | 218 // static |
| 219 bool BluetoothAdapterMac::IsLowEnergyAvailable() { | 219 bool BluetoothAdapterMac::IsLowEnergyAvailable() { |
| 220 return base::mac::IsOSYosemiteOrLater(); | 220 return base::mac::IsOSYosemiteOrLater(); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 516 } |
| 517 | 517 |
| 518 void BluetoothAdapterMac::AddPairedDevices() { | 518 void BluetoothAdapterMac::AddPairedDevices() { |
| 519 // Add any new paired devices. | 519 // Add any new paired devices. |
| 520 for (IOBluetoothDevice* device in [IOBluetoothDevice pairedDevices]) { | 520 for (IOBluetoothDevice* device in [IOBluetoothDevice pairedDevices]) { |
| 521 ClassicDeviceAdded(device); | 521 ClassicDeviceAdded(device); |
| 522 } | 522 } |
| 523 } | 523 } |
| 524 | 524 |
| 525 } // namespace device | 525 } // namespace device |
| OLD | NEW |