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

Unified Diff: device/bluetooth/test/mock_bluetooth_central_manager_mac.mm

Issue 1538173003: Implementing GATT connection/disconnect on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing chromium.gyp_env Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
diff --git a/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm b/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
index 96e7ce9564303e3180cd52e75d1d9d9f8b149596..4a6e48b4c9a93c7191d86ccc8014ecfb96051cee 100644
--- a/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
+++ b/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
@@ -4,12 +4,15 @@
#import "mock_bluetooth_central_manager_mac.h"
+#import "mock_bluetooth_cbperipheral_mac.h"
+
@implementation MockCentralManager
@synthesize scanForPeripheralsCallCount = _scanForPeripheralsCallCount;
@synthesize stopScanCallCount = _stopScanCallCount;
@synthesize delegate = _delegate;
@synthesize state = _state;
+@synthesize connectPeripheralCallCount = _connectPeripheralCallCount;
- (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs
options:(NSDictionary*)options {
@@ -20,4 +23,14 @@
_stopScanCallCount++;
}
+- (void)connectPeripheral:(CBPeripheral*)peripheral
+ options:(NSDictionary*)options {
+ _connectPeripheralCallCount++;
+}
+
+- (void)cancelPeripheralConnection:(CBPeripheral*)peripheral {
+ MockCBPeripheral* mockPeripheral = (MockCBPeripheral*)peripheral;
+ [mockPeripheral setStateForTesting:CBPeripheralStateDisconnected];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698