| OLD | NEW |
| 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 #include "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h" | 5 #include "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "device/bluetooth/test/bluetooth_test_mac.h" | 9 #include "device/bluetooth/test/bluetooth_test_mac.h" |
| 10 #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h" | 10 #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 [_delegate peripheral:self.peripheral | 137 [_delegate peripheral:self.peripheral |
| 138 didDiscoverCharacteristicsForService:service | 138 didDiscoverCharacteristicsForService:service |
| 139 error:nil]; | 139 error:nil]; |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 - (void)didModifyServices:(NSArray*)invalidatedServices { | 143 - (void)didModifyServices:(NSArray*)invalidatedServices { |
| 144 // -[CBPeripheralDelegate peripheral:didModifyServices:] is only available | 144 // -[CBPeripheralDelegate peripheral:didModifyServices:] is only available |
| 145 // with 10.9. It is safe to call this method (even if chrome is running on | 145 // with 10.9. It is safe to call this method (even if chrome is running on |
| 146 // 10.8) since WebBluetooth is enabled only with 10.10. | 146 // 10.8) since WebBluetooth is enabled only with 10.10. |
| 147 // TODO(crbug.com/653056) |
| 147 DCHECK( | 148 DCHECK( |
| 148 [_delegate respondsToSelector:@selector(peripheral:didModifyServices:)]); | 149 [_delegate respondsToSelector:@selector(peripheral:didModifyServices:)]); |
| 149 #pragma clang diagnostic push | 150 #pragma clang diagnostic push |
| 150 #pragma clang diagnostic ignored "-Wpartial-availability" | 151 #pragma clang diagnostic ignored "-Wpartial-availability" |
| 151 [_delegate peripheral:self.peripheral didModifyServices:invalidatedServices]; | 152 [_delegate peripheral:self.peripheral didModifyServices:invalidatedServices]; |
| 152 #pragma clang diagnostic pop | 153 #pragma clang diagnostic pop |
| 153 } | 154 } |
| 154 | 155 |
| 155 - (NSUUID*)identifier { | 156 - (NSUUID*)identifier { |
| 156 return _identifier.get(); | 157 return _identifier.get(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 167 - (CBPeripheral*)peripheral { | 168 - (CBPeripheral*)peripheral { |
| 168 return ObjCCast<CBPeripheral>(self); | 169 return ObjCCast<CBPeripheral>(self); |
| 169 } | 170 } |
| 170 | 171 |
| 171 - (void)setNotifyValue:(BOOL)notification | 172 - (void)setNotifyValue:(BOOL)notification |
| 172 forCharacteristic:(CBCharacteristic*)characteristic { | 173 forCharacteristic:(CBCharacteristic*)characteristic { |
| 173 _bluetoothTestMac->OnFakeBluetoothGattSetCharacteristicNotification(); | 174 _bluetoothTestMac->OnFakeBluetoothGattSetCharacteristicNotification(); |
| 174 } | 175 } |
| 175 | 176 |
| 176 @end | 177 @end |
| OLD | NEW |