OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" | 5 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 if (property_name == properties->powered.name()) { | 326 if (property_name == properties->powered.name()) { |
327 PoweredChanged(properties->powered.value()); | 327 PoweredChanged(properties->powered.value()); |
328 | 328 |
329 } else if (property_name == properties->discovering.name()) { | 329 } else if (property_name == properties->discovering.name()) { |
330 DiscoveringChanged(properties->discovering.value()); | 330 DiscoveringChanged(properties->discovering.value()); |
331 | 331 |
332 } else if (property_name == properties->devices.name()) { | 332 } else if (property_name == properties->devices.name()) { |
333 DevicesChanged(properties->devices.value()); | 333 DevicesChanged(properties->devices.value()); |
334 | 334 |
| 335 } else if (property_name == properties->address.name()) { |
| 336 address_ = properties->address.value(); |
| 337 |
335 } | 338 } |
336 } | 339 } |
337 | 340 |
338 void BluetoothAdapter::DevicePropertyChanged( | 341 void BluetoothAdapter::DevicePropertyChanged( |
339 const dbus::ObjectPath& device_path, | 342 const dbus::ObjectPath& device_path, |
340 const std::string& property_name) { | 343 const std::string& property_name) { |
341 UpdateDevice(device_path); | 344 UpdateDevice(device_path); |
342 } | 345 } |
343 | 346 |
344 void BluetoothAdapter::UpdateDevice(const dbus::ObjectPath& device_path) { | 347 void BluetoothAdapter::UpdateDevice(const dbus::ObjectPath& device_path) { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 562 } |
560 | 563 |
561 // static | 564 // static |
562 BluetoothAdapter* BluetoothAdapter::Create(const std::string& address) { | 565 BluetoothAdapter* BluetoothAdapter::Create(const std::string& address) { |
563 BluetoothAdapter* adapter = new BluetoothAdapter; | 566 BluetoothAdapter* adapter = new BluetoothAdapter; |
564 adapter->FindAdapter(address); | 567 adapter->FindAdapter(address); |
565 return adapter; | 568 return adapter; |
566 } | 569 } |
567 | 570 |
568 } // namespace chromeos | 571 } // namespace chromeos |
OLD | NEW |