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

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

Issue 1054743003: Add CPP API for BLE advertisments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tentative win fix Created 5 years, 7 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 9
10 #include <string> 10 #include <string>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 void BluetoothAdapterMac::RegisterAudioSink( 135 void BluetoothAdapterMac::RegisterAudioSink(
136 const BluetoothAudioSink::Options& options, 136 const BluetoothAudioSink::Options& options,
137 const AcquiredCallback& callback, 137 const AcquiredCallback& callback,
138 const BluetoothAudioSink::ErrorCallback& error_callback) { 138 const BluetoothAudioSink::ErrorCallback& error_callback) {
139 NOTIMPLEMENTED(); 139 NOTIMPLEMENTED();
140 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM); 140 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM);
141 } 141 }
142 142
143 void BluetoothAdapterMac::RegisterAdvertisement(
144 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data,
145 const CreateAdvertisementCallback& callback,
146 const CreateAdvertisementErrorCallback& error_callback) {
147 NOTIMPLEMENTED();
148 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM);
149 }
150
143 void BluetoothAdapterMac::DeviceFound(IOBluetoothDevice* device) { 151 void BluetoothAdapterMac::DeviceFound(IOBluetoothDevice* device) {
144 DeviceAdded(device); 152 DeviceAdded(device);
145 } 153 }
146 154
147 void BluetoothAdapterMac::DiscoveryStopped(bool unexpected) { 155 void BluetoothAdapterMac::DiscoveryStopped(bool unexpected) {
148 if (unexpected) { 156 if (unexpected) {
149 DVLOG(1) << "Discovery stopped unexpectedly"; 157 DVLOG(1) << "Discovery stopped unexpectedly";
150 num_discovery_sessions_ = 0; 158 num_discovery_sessions_ = 0;
151 MarkDiscoverySessionsAsInactive(); 159 MarkDiscoverySessionsAsInactive();
152 } 160 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 DCHECK_EQ(num_removed, 1U); 357 DCHECK_EQ(num_removed, 1U);
350 } 358 }
351 359
352 // Add any new paired devices. 360 // Add any new paired devices.
353 for (IOBluetoothDevice* device in [IOBluetoothDevice pairedDevices]) { 361 for (IOBluetoothDevice* device in [IOBluetoothDevice pairedDevices]) {
354 DeviceAdded(device); 362 DeviceAdded(device);
355 } 363 }
356 } 364 }
357 365
358 } // namespace device 366 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698