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

Side by Side 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 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 #import "mock_bluetooth_central_manager_mac.h" 5 #import "mock_bluetooth_central_manager_mac.h"
6 6
7 #import "mock_bluetooth_cbperipheral_mac.h"
8
7 @implementation MockCentralManager 9 @implementation MockCentralManager
8 10
9 @synthesize scanForPeripheralsCallCount = _scanForPeripheralsCallCount; 11 @synthesize scanForPeripheralsCallCount = _scanForPeripheralsCallCount;
10 @synthesize stopScanCallCount = _stopScanCallCount; 12 @synthesize stopScanCallCount = _stopScanCallCount;
11 @synthesize delegate = _delegate; 13 @synthesize delegate = _delegate;
12 @synthesize state = _state; 14 @synthesize state = _state;
15 @synthesize connectPeripheralCallCount = _connectPeripheralCallCount;
13 16
14 - (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs 17 - (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs
15 options:(NSDictionary*)options { 18 options:(NSDictionary*)options {
16 _scanForPeripheralsCallCount++; 19 _scanForPeripheralsCallCount++;
17 } 20 }
18 21
19 - (void)stopScan { 22 - (void)stopScan {
20 _stopScanCallCount++; 23 _stopScanCallCount++;
21 } 24 }
22 25
26 - (void)connectPeripheral:(CBPeripheral*)peripheral
27 options:(NSDictionary*)options {
28 _connectPeripheralCallCount++;
29 }
30
31 - (void)cancelPeripheralConnection:(CBPeripheral*)peripheral {
32 MockCBPeripheral* mockPeripheral = (MockCBPeripheral*)peripheral;
33 [mockPeripheral setStateForTesting:CBPeripheralStateDisconnected];
34 }
35
23 @end 36 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698