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

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

Issue 2353133005: Add the chrome.bluetoothLowEnergy.setAdvertisingInterval API. (Closed)
Patch Set: . Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_adapter_mac.h" 5 #include "device/bluetooth/bluetooth_adapter_mac.h"
6 6
7 #import <IOBluetooth/objc/IOBluetoothDevice.h> 7 #import <IOBluetooth/objc/IOBluetoothDevice.h>
8 #import <IOBluetooth/objc/IOBluetoothHostController.h> 8 #import <IOBluetooth/objc/IOBluetoothHostController.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 const BluetoothAudioSink::Options& options, 199 const BluetoothAudioSink::Options& options,
200 const AcquiredCallback& callback, 200 const AcquiredCallback& callback,
201 const BluetoothAudioSink::ErrorCallback& error_callback) { 201 const BluetoothAudioSink::ErrorCallback& error_callback) {
202 NOTIMPLEMENTED(); 202 NOTIMPLEMENTED();
203 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM); 203 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM);
204 } 204 }
205 205
206 void BluetoothAdapterMac::RegisterAdvertisement( 206 void BluetoothAdapterMac::RegisterAdvertisement(
207 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, 207 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data,
208 const CreateAdvertisementCallback& callback, 208 const CreateAdvertisementCallback& callback,
209 const CreateAdvertisementErrorCallback& error_callback) { 209 const AdvertisementErrorCallback& error_callback) {
210 NOTIMPLEMENTED(); 210 NOTIMPLEMENTED();
211 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM); 211 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM);
212 } 212 }
213 213
214 BluetoothLocalGattService* BluetoothAdapterMac::GetGattService( 214 BluetoothLocalGattService* BluetoothAdapterMac::GetGattService(
215 const std::string& identifier) const { 215 const std::string& identifier) const {
216 return nullptr; 216 return nullptr;
217 } 217 }
218 218
219 void BluetoothAdapterMac::ClassicDeviceFound(IOBluetoothDevice* device) { 219 void BluetoothAdapterMac::ClassicDeviceFound(IOBluetoothDevice* device) {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 std::string device_address = 635 std::string device_address =
636 BluetoothLowEnergyDeviceMac::GetPeripheralHashAddress(peripheral); 636 BluetoothLowEnergyDeviceMac::GetPeripheralHashAddress(peripheral);
637 DevicesMap::const_iterator iter = devices_.find(device_address); 637 DevicesMap::const_iterator iter = devices_.find(device_address);
638 if (iter == devices_.end()) { 638 if (iter == devices_.end()) {
639 return nil; 639 return nil;
640 } 640 }
641 return static_cast<BluetoothLowEnergyDeviceMac*>(iter->second); 641 return static_cast<BluetoothLowEnergyDeviceMac*>(iter->second);
642 } 642 }
643 643
644 } // namespace device 644 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698