| 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 79eb75469959a01935694310f69345fd2f7ab935..ac18cd5d7f7e34f68291bde6a9dcae885442faf1 100644
|
| --- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
|
| +++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
|
| @@ -287,7 +287,7 @@ void BluetoothAdapter::UpdateDevice(const dbus::ObjectPath& device_path) {
|
|
|
| // Device has an address and was not previously known, add to the map
|
| // and notify observers.
|
| - BluetoothDevice* device = BluetoothDevice::CreateBound(device_path,
|
| + BluetoothDevice* device = BluetoothDevice::CreateBound(this, device_path,
|
| properties);
|
| devices_[address] = device;
|
|
|
| @@ -304,6 +304,14 @@ BluetoothAdapter::DeviceList BluetoothAdapter::GetDevices() {
|
| return devices;
|
| }
|
|
|
| +BluetoothDevice* BluetoothAdapter::GetDevice(const std::string& address) {
|
| + DevicesMap::iterator iter = devices_.find(address);
|
| + if (iter != devices_.end())
|
| + return iter->second;
|
| +
|
| + return NULL;
|
| +}
|
| +
|
| void BluetoothAdapter::ClearDevices() {
|
| for (DevicesMap::iterator iter = devices_.begin();
|
| iter != devices_.end(); ++iter) {
|
| @@ -381,7 +389,7 @@ void BluetoothAdapter::DeviceFound(
|
| BluetoothDevice* device;
|
| DevicesMap::iterator iter = devices_.find(address);
|
| if (iter == devices_.end()) {
|
| - device = BluetoothDevice::CreateUnbound(&properties);
|
| + device = BluetoothDevice::CreateUnbound(this, &properties);
|
| devices_[address] = device;
|
|
|
| if (device->IsSupported())
|
|
|