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

Side by Side Diff: device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Nit for the tests Created 4 years, 1 month 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 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
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
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
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test_mac.mm ('k') | device/bluetooth/test/mock_bluetooth_central_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698