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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 1260533003: BluetoothTest.* tests in bluetooth_device_unittests.cc run on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test2
Patch Set: Created 5 years, 4 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/bluetooth_low_energy_device_mac.h" 5 #include "device/bluetooth/bluetooth_low_energy_device_mac.h"
6 6
7 #import <CoreFoundation/CoreFoundation.h> 7 #import <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 advertised_uuids_.push_back( 67 advertised_uuids_.push_back(
68 BluetoothUUID(std::string([[uuid UUIDString] UTF8String]))); 68 BluetoothUUID(std::string([[uuid UUIDString] UTF8String])));
69 } 69 }
70 } 70 }
71 71
72 std::string BluetoothLowEnergyDeviceMac::GetIdentifier() const { 72 std::string BluetoothLowEnergyDeviceMac::GetIdentifier() const {
73 return identifier_; 73 return identifier_;
74 } 74 }
75 75
76 uint32 BluetoothLowEnergyDeviceMac::GetBluetoothClass() const { 76 uint32 BluetoothLowEnergyDeviceMac::GetBluetoothClass() const {
77 return 0; 77 return 0x1F00; // Unspecified Device Class
78 } 78 }
79 79
80 std::string BluetoothLowEnergyDeviceMac::GetAddress() const { 80 std::string BluetoothLowEnergyDeviceMac::GetAddress() const {
81 return hash_address_; 81 return hash_address_;
82 } 82 }
83 83
84 BluetoothDevice::VendorIDSource BluetoothLowEnergyDeviceMac::GetVendorIDSource() 84 BluetoothDevice::VendorIDSource BluetoothLowEnergyDeviceMac::GetVendorIDSource()
85 const { 85 const {
86 return VENDOR_ID_UNKNOWN; 86 return VENDOR_ID_UNKNOWN;
87 } 87 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 instanceMethodSignatureForSelector:@selector(state)] retain]); 239 instanceMethodSignatureForSelector:@selector(state)] retain]);
240 base::scoped_nsobject<NSInvocation> invocation( 240 base::scoped_nsobject<NSInvocation> invocation(
241 [[NSInvocation invocationWithMethodSignature:signature] retain]); 241 [[NSInvocation invocationWithMethodSignature:signature] retain]);
242 [invocation setTarget:peripheral_]; 242 [invocation setTarget:peripheral_];
243 [invocation setSelector:@selector(state)]; 243 [invocation setSelector:@selector(state)];
244 [invocation invoke]; 244 [invocation invoke];
245 CBPeripheralState state = CBPeripheralStateDisconnected; 245 CBPeripheralState state = CBPeripheralStateDisconnected;
246 [invocation getReturnValue:&state]; 246 [invocation getReturnValue:&state];
247 return state; 247 return state;
248 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698