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

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

Issue 2028823003: Mac: Make ScopedTypeRef require explicit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove dependency Created 4 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 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 #include "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h" 5 #include "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "device/bluetooth/test/bluetooth_test_mac.h" 9 #include "device/bluetooth/test/bluetooth_test_mac.h"
10 #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h" 10 #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (aClass == [CBPeripheral class] || 69 if (aClass == [CBPeripheral class] ||
70 [aClass isSubclassOfClass:[CBPeripheral class]]) { 70 [aClass isSubclassOfClass:[CBPeripheral class]]) {
71 return YES; 71 return YES;
72 } 72 }
73 return [super isKindOfClass:aClass]; 73 return [super isKindOfClass:aClass];
74 } 74 }
75 75
76 - (void)setState:(CBPeripheralState)state { 76 - (void)setState:(CBPeripheralState)state {
77 _state = state; 77 _state = state;
78 if (_state == CBPeripheralStateDisconnected) { 78 if (_state == CBPeripheralStateDisconnected) {
79 _services = nil; 79 _services.reset();
80 } 80 }
81 } 81 }
82 82
83 - (void)discoverServices:(NSArray*)serviceUUIDs { 83 - (void)discoverServices:(NSArray*)serviceUUIDs {
84 if (_bluetoothTestMac) { 84 if (_bluetoothTestMac) {
85 _bluetoothTestMac->OnFakeBluetoothServiceDiscovery(); 85 _bluetoothTestMac->OnFakeBluetoothServiceDiscovery();
86 } 86 }
87 } 87 }
88 88
89 - (void)removeAllServices { 89 - (void)removeAllServices {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 - (NSArray*)services { 132 - (NSArray*)services {
133 return _services.get(); 133 return _services.get();
134 } 134 }
135 135
136 - (CBPeripheral*)peripheral { 136 - (CBPeripheral*)peripheral {
137 return ObjCCast<CBPeripheral>(self); 137 return ObjCCast<CBPeripheral>(self);
138 } 138 }
139 139
140 @end 140 @end
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test_mac.mm ('k') | ios/chrome/browser/passwords/password_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698