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

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

Issue 2282763004: bluetooth: mac: Improve classic device discovery and update (Closed)
Patch Set: Address moar comments Created 4 years, 2 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
« no previous file with comments | « device/bluetooth/bluetooth_discovery_manager_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_discovery_manager_mac.h" 5 #include "device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/mac/sdk_forward_declarations.h" 10 #include "base/mac/sdk_forward_declarations.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void BluetoothLowEnergyDiscoveryManagerMac::SetCentralManager( 87 void BluetoothLowEnergyDiscoveryManagerMac::SetCentralManager(
88 CBCentralManager* central_manager) { 88 CBCentralManager* central_manager) {
89 central_manager_ = central_manager; 89 central_manager_ = central_manager;
90 } 90 }
91 91
92 void BluetoothLowEnergyDiscoveryManagerMac::DiscoveredPeripheral( 92 void BluetoothLowEnergyDiscoveryManagerMac::DiscoveredPeripheral(
93 CBPeripheral* peripheral, 93 CBPeripheral* peripheral,
94 NSDictionary* advertisementData, 94 NSDictionary* advertisementData,
95 int rssi) { 95 int rssi) {
96 VLOG(1) << "DiscoveredPeripheral"; 96 VLOG(3) << "DiscoveredPeripheral";
97 observer_->LowEnergyDeviceUpdated(peripheral, advertisementData, rssi); 97 observer_->LowEnergyDeviceUpdated(peripheral, advertisementData, rssi);
98 } 98 }
99 99
100 BluetoothLowEnergyDiscoveryManagerMac* 100 BluetoothLowEnergyDiscoveryManagerMac*
101 BluetoothLowEnergyDiscoveryManagerMac::Create(Observer* observer) { 101 BluetoothLowEnergyDiscoveryManagerMac::Create(Observer* observer) {
102 return new BluetoothLowEnergyDiscoveryManagerMac(observer); 102 return new BluetoothLowEnergyDiscoveryManagerMac(observer);
103 } 103 }
104 104
105 BluetoothLowEnergyDiscoveryManagerMac::BluetoothLowEnergyDiscoveryManagerMac( 105 BluetoothLowEnergyDiscoveryManagerMac::BluetoothLowEnergyDiscoveryManagerMac(
106 Observer* observer) 106 Observer* observer)
107 : observer_(observer) { 107 : observer_(observer) {
108 DCHECK(BluetoothAdapterMac::IsLowEnergyAvailable()); 108 DCHECK(BluetoothAdapterMac::IsLowEnergyAvailable());
109 discovering_ = false; 109 discovering_ = false;
110 } 110 }
111 111
112 } // namespace device 112 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_discovery_manager_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698