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

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

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted two small unnecessary changes. Created 4 years, 5 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
7 7
8 #if defined(OS_IOS) 8 #if defined(OS_IOS)
9 #import <CoreBluetooth/CoreBluetooth.h> 9 #import <CoreBluetooth/CoreBluetooth.h>
10 #else // !defined(OS_IOS) 10 #else // !defined(OS_IOS)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const ErrorCallback& error_callback) override; 76 const ErrorCallback& error_callback) override;
77 void ConnectToService( 77 void ConnectToService(
78 const BluetoothUUID& uuid, 78 const BluetoothUUID& uuid,
79 const ConnectToServiceCallback& callback, 79 const ConnectToServiceCallback& callback,
80 const ConnectToServiceErrorCallback& error_callback) override; 80 const ConnectToServiceErrorCallback& error_callback) override;
81 void ConnectToServiceInsecurely( 81 void ConnectToServiceInsecurely(
82 const device::BluetoothUUID& uuid, 82 const device::BluetoothUUID& uuid,
83 const ConnectToServiceCallback& callback, 83 const ConnectToServiceCallback& callback,
84 const ConnectToServiceErrorCallback& error_callback) override; 84 const ConnectToServiceErrorCallback& error_callback) override;
85 85
86 // BluetoothDeviceMac override.
87 NSDate* GetLastUpdateTime() const override;
88
89 protected: 86 protected:
90 // BluetoothDevice override. 87 // BluetoothDevice override.
91 std::string GetDeviceName() const override; 88 std::string GetDeviceName() const override;
92 void CreateGattConnectionImpl() override; 89 void CreateGattConnectionImpl() override;
93 void DisconnectGatt() override; 90 void DisconnectGatt() override;
94 91
95 // Methods used by BluetoothLowEnergyPeripheralBridge. 92 // Methods used by BluetoothLowEnergyPeripheralBridge.
96 void DidDiscoverPrimaryServices(NSError* error); 93 void DidDiscoverPrimaryServices(NSError* error);
97 void DidModifyServices(NSArray* invalidatedServices); 94 void DidModifyServices(NSArray* invalidatedServices);
98 void DidDiscoverCharacteristics(CBService* cb_service, NSError* error); 95 void DidDiscoverCharacteristics(CBService* cb_service, NSError* error);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Whether the device is connectable. 138 // Whether the device is connectable.
142 bool connectable_; 139 bool connectable_;
143 140
144 // The peripheral's identifier, as returned by [CBPeripheral identifier]. 141 // The peripheral's identifier, as returned by [CBPeripheral identifier].
145 std::string identifier_; 142 std::string identifier_;
146 143
147 // A local address for the device created by hashing the peripheral 144 // A local address for the device created by hashing the peripheral
148 // identifier. 145 // identifier.
149 std::string hash_address_; 146 std::string hash_address_;
150 147
151 // Stores the time of the most recent call to Update().
152 base::scoped_nsobject<NSDate> last_update_time_;
153
154 // The services (identified by UUIDs) that this device provides. 148 // The services (identified by UUIDs) that this device provides.
155 std::set<BluetoothUUID> advertised_uuids_; 149 std::set<BluetoothUUID> advertised_uuids_;
156 150
157 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); 151 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
158 }; 152 };
159 153
160 } // namespace device 154 } // namespace device
161 155
162 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 156 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_mac.h ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698