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_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void OnRegisterAgent(); | 175 void OnRegisterAgent(); |
176 void OnRegisterAgentError(const std::string& error_name, | 176 void OnRegisterAgentError(const std::string& error_name, |
177 const std::string& error_message); | 177 const std::string& error_message); |
178 | 178 |
179 // Called by dbus:: on completion of the D-Bus method call to request that | 179 // Called by dbus:: on completion of the D-Bus method call to request that |
180 // the pairing agent be made the default. | 180 // the pairing agent be made the default. |
181 void OnRequestDefaultAgent(); | 181 void OnRequestDefaultAgent(); |
182 void OnRequestDefaultAgentError(const std::string& error_name, | 182 void OnRequestDefaultAgentError(const std::string& error_name, |
183 const std::string& error_message); | 183 const std::string& error_message); |
184 | 184 |
| 185 // Called by BluetoothAudioSinkChromeOS on completion of registering an audio |
| 186 // sink. |
| 187 void OnRegisterAudioSink( |
| 188 const device::BluetoothAdapter::AcquiredCallback& callback, |
| 189 scoped_refptr<device::BluetoothAudioSink> audio_sink); |
| 190 |
185 // Internal method to obtain a BluetoothPairingChromeOS object for the device | 191 // Internal method to obtain a BluetoothPairingChromeOS object for the device |
186 // with path |object_path|. Returns the existing pairing object if the device | 192 // with path |object_path|. Returns the existing pairing object if the device |
187 // already has one (usually an outgoing connection in progress) or a new | 193 // already has one (usually an outgoing connection in progress) or a new |
188 // pairing object with the default pairing delegate if not. If no default | 194 // pairing object with the default pairing delegate if not. If no default |
189 // pairing object exists, NULL will be returned. | 195 // pairing object exists, NULL will be returned. |
190 BluetoothPairingChromeOS* GetPairing(const dbus::ObjectPath& object_path); | 196 BluetoothPairingChromeOS* GetPairing(const dbus::ObjectPath& object_path); |
191 | 197 |
192 // Set the tracked adapter to the one in |object_path|, this object will | 198 // Set the tracked adapter to the one in |object_path|, this object will |
193 // subsequently operate on that adapter until it is removed. | 199 // subsequently operate on that adapter until it is removed. |
194 void SetAdapter(const dbus::ObjectPath& object_path); | 200 void SetAdapter(const dbus::ObjectPath& object_path); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // Note: This should remain the last member so it'll be destroyed and | 284 // Note: This should remain the last member so it'll be destroyed and |
279 // invalidate its weak pointers before any other members are destroyed. | 285 // invalidate its weak pointers before any other members are destroyed. |
280 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_; | 286 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_; |
281 | 287 |
282 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS); | 288 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS); |
283 }; | 289 }; |
284 | 290 |
285 } // namespace chromeos | 291 } // namespace chromeos |
286 | 292 |
287 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ | 293 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ |
OLD | NEW |