Chromium Code Reviews| Index: chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc |
| diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc |
| index 2ffd17f0dd2d6922ce7e9a5b682b6eb5a80c2523..8d7acb2aaad5daf6d6a55c666bffa66c523bdcb4 100644 |
| --- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc |
| +++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc |
| @@ -12,6 +12,7 @@ |
| #include "chromeos/dbus/bluetooth_adapter_client.h" |
| #include "chromeos/dbus/bluetooth_device_client.h" |
| #include "chromeos/dbus/bluetooth_manager_client.h" |
| +#include "chromeos/dbus/bluetooth_out_of_band_client.h" |
| #include "chromeos/dbus/dbus_thread_manager.h" |
| #include "dbus/object_path.h" |
| @@ -251,7 +252,6 @@ void BluetoothAdapter::AdapterPropertyChanged( |
| } else if (property_name == properties->devices.name()) { |
| DevicesChanged(properties->devices.value()); |
| - |
|
keybuk
2012/06/08 20:06:39
why removed?
bryeung
2012/06/14 15:31:07
not sure how that happened, fixed
|
| } |
| } |
| @@ -276,7 +276,7 @@ void BluetoothAdapter::UpdateDevice(const dbus::ObjectPath& device_path) { |
| // or it may be the device going from discovered to connected and gaining |
| // an object path. Update the existing object and notify observers. |
| DevicesMap::iterator iter = devices_.find(address); |
| - if (iter != devices_.end()){ |
| + if (iter != devices_.end()) { |
| BluetoothDevice* device = iter->second; |
| if (!device->IsPaired()) |
| @@ -333,6 +333,32 @@ const BluetoothDevice* BluetoothAdapter::GetDevice( |
| return NULL; |
| } |
| +void BluetoothAdapter::ReadLocalOutOfBandPairingData( |
| + const BluetoothOutOfBandClient::DataCallback& callback) const { |
| + DBusThreadManager::Get()->GetBluetoothOutOfBandClient()-> |
| + ReadLocalData(object_path_, callback); |
| +} |
| + |
| +void BluetoothAdapter::SetOutOfBandPairingData(const std::string& address, |
| + const chromeos::BluetoothOutOfBandPairingData& data, |
| + const chromeos::BluetoothOutOfBandClient::SuccessCallback& callback) { |
| + DBusThreadManager::Get()->GetBluetoothOutOfBandClient()-> |
| + AddRemoteData( |
| + object_path_, |
| + address, |
| + data, |
| + callback); |
| +} |
| + |
| +void BluetoothAdapter::ClearOutOfBandPairingData(const std::string& address, |
| + const chromeos::BluetoothOutOfBandClient::SuccessCallback& callback) { |
| + DBusThreadManager::Get()->GetBluetoothOutOfBandClient()-> |
| + RemoveRemoteData( |
| + object_path_, |
| + address, |
| + callback); |
| +} |
| + |
| void BluetoothAdapter::ClearDevices() { |
| for (DevicesMap::iterator iter = devices_.begin(); |
| iter != devices_.end(); ++iter) { |