| 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 "chromeos/dbus/bluetooth_node_client.h" | 5 #include "chromeos/dbus/bluetooth_node_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 #include "chromeos/dbus/bluetooth_device_client.h" | 13 #include "chromeos/dbus/bluetooth_device_client.h" |
| 14 #include "chromeos/dbus/bluetooth_property.h" | 14 #include "chromeos/dbus/bluetooth_property.h" |
| 15 #include "dbus/bus.h" | 15 #include "dbus/bus.h" |
| 16 #include "dbus/message.h" | 16 #include "dbus/message.h" |
| 17 #include "dbus/object_path.h" | 17 #include "dbus/object_path.h" |
| 18 #include "dbus/object_proxy.h" | 18 #include "dbus/object_proxy.h" |
| 19 #include "third_party/cros_system_api/dbus/service_constants.h" | 19 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 | 22 |
| 23 BluetoothNodeClient::Properties::Properties(dbus::ObjectProxy* object_proxy, | 23 BluetoothNodeClient::Properties::Properties( |
| 24 PropertyChangedCallback callback) | 24 dbus::ObjectProxy* object_proxy, |
| 25 const PropertyChangedCallback& callback) |
| 25 : BluetoothPropertySet(object_proxy, | 26 : BluetoothPropertySet(object_proxy, |
| 26 bluetooth_node::kBluetoothNodeInterface, | 27 bluetooth_node::kBluetoothNodeInterface, |
| 27 callback) { | 28 callback) { |
| 28 RegisterProperty(bluetooth_node::kNameProperty, &name); | 29 RegisterProperty(bluetooth_node::kNameProperty, &name); |
| 29 RegisterProperty(bluetooth_node::kDeviceProperty, &device); | 30 RegisterProperty(bluetooth_node::kDeviceProperty, &device); |
| 30 } | 31 } |
| 31 | 32 |
| 32 BluetoothNodeClient::Properties::~Properties() { | 33 BluetoothNodeClient::Properties::~Properties() { |
| 33 } | 34 } |
| 34 | 35 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 DBusClientImplementationType type, | 194 DBusClientImplementationType type, |
| 194 dbus::Bus* bus, | 195 dbus::Bus* bus, |
| 195 BluetoothDeviceClient* adapter_client) { | 196 BluetoothDeviceClient* adapter_client) { |
| 196 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 197 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
| 197 return new BluetoothNodeClientImpl(bus, adapter_client); | 198 return new BluetoothNodeClientImpl(bus, adapter_client); |
| 198 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 199 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
| 199 return new BluetoothNodeClientStubImpl(); | 200 return new BluetoothNodeClientStubImpl(); |
| 200 } | 201 } |
| 201 | 202 |
| 202 } // namespace chromeos | 203 } // namespace chromeos |
| OLD | NEW |