| 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_input_client.h" | 5 #include "chromeos/dbus/bluetooth_input_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_adapter_client.h" | 13 #include "chromeos/dbus/bluetooth_adapter_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 const char BluetoothInputClient::kNoResponseError[] = | 23 const char BluetoothInputClient::kNoResponseError[] = |
| 24 "org.chromium.Error.NoResponse"; | 24 "org.chromium.Error.NoResponse"; |
| 25 | 25 |
| 26 BluetoothInputClient::Properties::Properties(dbus::ObjectProxy* object_proxy, | 26 BluetoothInputClient::Properties::Properties( |
| 27 PropertyChangedCallback callback) | 27 dbus::ObjectProxy* object_proxy, |
| 28 const PropertyChangedCallback& callback) |
| 28 : BluetoothPropertySet(object_proxy, | 29 : BluetoothPropertySet(object_proxy, |
| 29 bluetooth_input::kBluetoothInputInterface, | 30 bluetooth_input::kBluetoothInputInterface, |
| 30 callback) { | 31 callback) { |
| 31 RegisterProperty(bluetooth_input::kConnectedProperty, &connected); | 32 RegisterProperty(bluetooth_input::kConnectedProperty, &connected); |
| 32 } | 33 } |
| 33 | 34 |
| 34 BluetoothInputClient::Properties::~Properties() { | 35 BluetoothInputClient::Properties::~Properties() { |
| 35 } | 36 } |
| 36 | 37 |
| 37 | 38 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 DBusClientImplementationType type, | 283 DBusClientImplementationType type, |
| 283 dbus::Bus* bus, | 284 dbus::Bus* bus, |
| 284 BluetoothAdapterClient* adapter_client) { | 285 BluetoothAdapterClient* adapter_client) { |
| 285 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 286 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
| 286 return new BluetoothInputClientImpl(bus, adapter_client); | 287 return new BluetoothInputClientImpl(bus, adapter_client); |
| 287 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 288 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
| 288 return new BluetoothInputClientStubImpl(); | 289 return new BluetoothInputClientStubImpl(); |
| 289 } | 290 } |
| 290 | 291 |
| 291 } // namespace chromeos | 292 } // namespace chromeos |
| OLD | NEW |