OLD | NEW |
---|---|
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 | 75 |
76 // Registers that a new |device| has connected to the local host. | 76 // Registers that a new |device| has connected to the local host. |
77 void DeviceConnected(IOBluetoothDevice* device); | 77 void DeviceConnected(IOBluetoothDevice* device); |
78 | 78 |
79 protected: | 79 protected: |
80 // BluetoothAdapter: | 80 // BluetoothAdapter: |
81 void RemovePairingDelegateInternal( | 81 void RemovePairingDelegateInternal( |
82 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; | 82 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; |
83 | 83 |
84 private: | 84 private: |
85 friend class base::DeleteHelper<BluetoothAdapterMac>; | |
85 friend class BluetoothAdapterMacTest; | 86 friend class BluetoothAdapterMacTest; |
86 | 87 |
87 BluetoothAdapterMac(); | 88 BluetoothAdapterMac(); |
88 ~BluetoothAdapterMac() override; | 89 ~BluetoothAdapterMac() override; |
89 | 90 |
90 // BluetoothAdapter: | 91 // BluetoothAdapter: |
92 virtual void DeleteOnCorrectThread() const override; | |
armansito
2014/12/16 22:01:47
nit: Drop virtual.
scheib
2014/12/16 22:15:26
Done.
| |
91 void AddDiscoverySession(const base::Closure& callback, | 93 void AddDiscoverySession(const base::Closure& callback, |
92 const ErrorCallback& error_callback) override; | 94 const ErrorCallback& error_callback) override; |
93 void RemoveDiscoverySession(const base::Closure& callback, | 95 void RemoveDiscoverySession(const base::Closure& callback, |
94 const ErrorCallback& error_callback) override; | 96 const ErrorCallback& error_callback) override; |
95 | 97 |
96 void Init(); | 98 void Init(); |
97 void InitForTest(scoped_refptr<base::SequencedTaskRunner> ui_task_runner); | 99 void InitForTest(scoped_refptr<base::SequencedTaskRunner> ui_task_runner); |
98 void PollAdapter(); | 100 void PollAdapter(); |
99 | 101 |
100 // Registers that a new |device| has replied to an Inquiry, is paired, or has | 102 // Registers that a new |device| has replied to an Inquiry, is paired, or has |
(...skipping 20 matching lines...) Expand all Loading... | |
121 ObserverList<BluetoothAdapter::Observer> observers_; | 123 ObserverList<BluetoothAdapter::Observer> observers_; |
122 | 124 |
123 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 125 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
124 | 126 |
125 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 127 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
126 }; | 128 }; |
127 | 129 |
128 } // namespace device | 130 } // namespace device |
129 | 131 |
130 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 132 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
OLD | NEW |