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

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

Issue 1538173003: Implementing GATT connection/disconnect on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the patch. Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "mock_bluetooth_cbperipheral_mac.h"
6
7 #include "base/mac/scoped_nsobject.h"
8
9 @interface MockCBPeripheral () {
10 base::scoped_nsobject<NSUUID> _identifier;
11 base::scoped_nsobject<NSString> _name;
12 }
13
14 @end
15
16 @implementation MockCBPeripheral
17
18 @synthesize state = _state;
19
20 - (instancetype)initWithIdentifier:(NSUUID*)identifier {
21 self = [super init];
22 if (self) {
23 _identifier.reset([identifier retain]);
24 _name.reset([@"FakeBluetoothDevice" retain]);
25 _state = CBPeripheralStateDisconnected;
26 }
27 return self;
28 }
29
30 - (void)setState:(CBPeripheralState)state {
31 _state = state;
32 }
33
34 - (NSUUID*)identifier {
35 return _identifier.get();
36 }
37
38 - (NSString*)name {
39 return _name.get();
40 }
41
42 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698