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

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

Issue 1538173003: Implementing GATT connection/disconnect on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
7 7
8 #include <IOKit/IOReturn.h> 8 #include <IOKit/IOReturn.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // CBCentralManager destructor was found to crash on the mac_chromium_rel_ng 94 // CBCentralManager destructor was found to crash on the mac_chromium_rel_ng
95 // builder running 10.9.5. May also cause blued to crash on OS X 10.9.5 95 // builder running 10.9.5. May also cause blued to crash on OS X 10.9.5
96 // (crbug.com/506287). 96 // (crbug.com/506287).
97 static bool IsLowEnergyAvailable(); 97 static bool IsLowEnergyAvailable();
98 98
99 // Resets |low_energy_central_manager_| to |central_manager| and sets 99 // Resets |low_energy_central_manager_| to |central_manager| and sets
100 // |low_energy_central_manager_delegate_| as the manager's delegate. Should 100 // |low_energy_central_manager_delegate_| as the manager's delegate. Should
101 // be called only when |IsLowEnergyAvailable()|. 101 // be called only when |IsLowEnergyAvailable()|.
102 void SetCentralManagerForTesting(CBCentralManager* central_manager); 102 void SetCentralManagerForTesting(CBCentralManager* central_manager);
103 103
104 void CreateGattConnection(BluetoothLowEnergyDeviceMac* deviceMac);
François Beaufort 2015/12/22 07:38:17 s/deviceMac/device_mac
jlebel 2016/02/10 13:38:51 Done.
105 void DidConnectPeripheral(CBPeripheral* peripheral);
106 void DisconnectGatt(BluetoothLowEnergyDeviceMac* deviceMac);
François Beaufort 2015/12/22 07:38:17 s/deviceMac/device_mac
jlebel 2016/02/10 13:38:51 Done.
107
104 protected: 108 protected:
105 // BluetoothAdapter override: 109 // BluetoothAdapter override:
106 void RemovePairingDelegateInternal( 110 void RemovePairingDelegateInternal(
107 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; 111 device::BluetoothDevice::PairingDelegate* pairing_delegate) override;
108 112
109 private: 113 private:
110 // The length of time that must elapse since the last Inquiry response (on 114 // The length of time that must elapse since the last Inquiry response (on
111 // Classic devices) or call to BluetoothLowEnergyDevice::Update() (on Low 115 // Classic devices) or call to BluetoothLowEnergyDevice::Update() (on Low
112 // Energy) before a discovered device is considered to be no longer available. 116 // Energy) before a discovered device is considered to be no longer available.
113 const static NSTimeInterval kDiscoveryTimeoutSec; 117 const static NSTimeInterval kDiscoveryTimeoutSec;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 185 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
182 186
183 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; 187 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_;
184 188
185 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); 189 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac);
186 }; 190 };
187 191
188 } // namespace device 192 } // namespace device
189 193
190 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 194 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698