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

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

Issue 1165053003: Adding support for Low Energy device discovery to BluetoothAdapterMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment fixes Created 5 years, 6 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
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_central_manager_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..0b0f10f0e565d6c058407a2a37f12466b8ae86f9
--- /dev/null
+++ b/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "mock_bluetooth_central_manager_mac.h"
+
+@implementation MockCentralManager
+
+@synthesize scanForPeripheralsCallCount = _scanForPeripheralsCallCount;
+@synthesize stopScanCallCount = _stopScanCallCount;
+@synthesize delegate = _delegate;
+
+- (instancetype)init {
+ _scanForPeripheralsCallCount = 0;
+ _stopScanCallCount = 0;
+ return self;
+}
+
+- (instancetype)initWithDelegate:(id<CBCentralManagerDelegate>)delegate
+ queue:(dispatch_queue_t)queue
+ options:(NSDictionary*)options {
+ return [self init];
+}
+
+- (CBCentralManagerState)state {
+ return CBCentralManagerStatePoweredOn;
+}
+
+- (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs
+ options:(NSDictionary*)options {
+ _scanForPeripheralsCallCount++;
+}
+
+- (void)stopScan {
+ _stopScanCallCount++;
+}
+
+@end
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_central_manager_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698