Index: chrome/browser/chromeos/bluetooth/bluetooth_device.cc |
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc |
index 0f42e73a58c9a64bf80cb8484b9207da901aaa6c..3c2e120eb8d7eedea1bbb8dbf65ca91921d2b9a1 100644 |
--- a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc |
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc |
@@ -22,6 +22,7 @@ |
#include "chromeos/dbus/bluetooth_agent_service_provider.h" |
#include "chromeos/dbus/bluetooth_device_client.h" |
#include "chromeos/dbus/bluetooth_input_client.h" |
+#include "chromeos/dbus/bluetooth_out_of_band_client.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
#include "chromeos/dbus/introspectable_client.h" |
#include "dbus/bus.h" |
@@ -551,6 +552,15 @@ void BluetoothDevice::ConnectToMatchingService( |
callback.Run(NULL); |
} |
+void BluetoothDevice::OnRemoteDataCallback(const base::Closure& callback, |
+ const ErrorCallback& error_callback, |
+ bool success) { |
+ if (success) |
+ callback.Run(); |
+ else |
+ error_callback.Run(); |
+} |
+ |
void BluetoothDevice::ConnectToService(const std::string& service_uuid, |
const SocketCallback& callback) { |
DBusThreadManager::Get()->GetBluetoothDeviceClient()-> |
@@ -563,6 +573,34 @@ void BluetoothDevice::ConnectToService(const std::string& service_uuid, |
callback)); |
} |
+void BluetoothDevice::SetOutOfBandPairingData( |
+ const chromeos::BluetoothOutOfBandPairingData& data, |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) { |
+ DBusThreadManager::Get()->GetBluetoothOutOfBandClient()-> |
+ AddRemoteData( |
+ object_path_, |
+ address(), |
+ data, |
+ base::Bind(&BluetoothDevice::OnRemoteDataCallback, |
+ weak_ptr_factory_.GetWeakPtr(), |
+ callback, |
+ error_callback)); |
+} |
+ |
+void BluetoothDevice::ClearOutOfBandPairingData( |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) { |
+ DBusThreadManager::Get()->GetBluetoothOutOfBandClient()-> |
+ RemoveRemoteData( |
+ object_path_, |
+ address(), |
+ base::Bind(&BluetoothDevice::OnRemoteDataCallback, |
+ weak_ptr_factory_.GetWeakPtr(), |
+ callback, |
+ error_callback)); |
+} |
+ |
void BluetoothDevice::ForgetCallback(const ErrorCallback& error_callback, |
const dbus::ObjectPath& adapter_path, |
bool success) { |