Chromium Code Reviews| Index: device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h |
| diff --git a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h |
| index fee3dc6923b7a6b89687f65b1f9146df0e106e60..82b5ce73121f663cac6ee7bab304e5996194a21c 100644 |
| --- a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h |
| +++ b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h |
| @@ -10,13 +10,21 @@ |
| #import <CoreBluetooth/CoreBluetooth.h> |
| +namespace device { |
| + |
| +class BluetoothTestMac; |
| +} |
|
ortuno
2016/05/06 16:03:34
nit: add new line.
jlebel
2016/05/07 00:16:12
I can't. |git cl format| removes it.
|
| + |
| // This class mocks the behavior of a CBPeripheral. |
| @interface MockCBPeripheral : NSObject |
| @property(nonatomic, readonly) CBPeripheralState state; |
| @property(nonatomic, readonly) NSUUID* identifier; |
| @property(nonatomic, readonly) NSString* name; |
| +@property(nonatomic, assign) id<CBPeripheralDelegate> delegate; |
| @property(nonatomic, readonly) CBPeripheral* peripheral; |
| +@property(retain, readonly) NSArray* services; |
| +@property(nonatomic, assign) device::BluetoothTestMac* bluetoothTestMac; |
| - (instancetype)init NS_UNAVAILABLE; |
| - (instancetype)initWithIdentifier:(NSUUID*)identifier; |
| @@ -24,7 +32,12 @@ |
| - (instancetype)initWithIdentifier:(NSUUID*)identifier |
| name:(NSString*)name NS_DESIGNATED_INITIALIZER; |
| +// Methods for faking events. |
| - (void)setState:(CBPeripheralState)state; |
| +- (void)removeAllServices; |
| +- (void)addServices:(NSArray*)services; |
| +- (void)didDiscoverWithError:(NSError*)error; |
| +- (void)removeServiceWithCBUUID:(CBUUID*)uuid; |
| @end |