| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_media_endpoint_service_provider.h" | 5 #include "chromeos/dbus/bluetooth_media_endpoint_service_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
| 12 #include "chromeos/dbus/bluetooth_media_transport_client.h" | 12 #include "chromeos/dbus/bluetooth_media_transport_client.h" |
| 13 #include "chromeos/dbus/dbus_thread_manager.h" | 13 #include "chromeos/dbus/dbus_thread_manager.h" |
| 14 #include "chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.h" | 14 #include "chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.h" |
| 15 #include "dbus/bus.h" | |
| 16 #include "dbus/exported_object.h" | 15 #include "dbus/exported_object.h" |
| 17 #include "dbus/message.h" | |
| 18 | 16 |
| 19 namespace { | 17 namespace { |
| 20 | 18 |
| 21 // TODO(mcchou): Move these constants to dbus/service_constants.h. | 19 // TODO(mcchou): Move these constants to dbus/service_constants.h. |
| 22 // Bluetooth Media Endpoint service identifier. | 20 // Bluetooth Media Endpoint service identifier. |
| 23 const char kBluetoothMediaEndpointInterface[] = "org.bluez.MediaEndpoint1"; | 21 const char kBluetoothMediaEndpointInterface[] = "org.bluez.MediaEndpoint1"; |
| 24 | 22 |
| 25 // Method names in Bluetooth Media Endpoint interface. | 23 // Method names in Bluetooth Media Endpoint interface. |
| 26 const char kSetConfiguration[] = "SetConfiguration"; | 24 const char kSetConfiguration[] = "SetConfiguration"; |
| 27 const char kSelectConfiguration[] = "SelectConfiguration"; | 25 const char kSelectConfiguration[] = "SelectConfiguration"; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // Returns a real implementation. | 306 // Returns a real implementation. |
| 309 if (!DBusThreadManager::Get()->IsUsingStub(DBusClientBundle::BLUETOOTH)) { | 307 if (!DBusThreadManager::Get()->IsUsingStub(DBusClientBundle::BLUETOOTH)) { |
| 310 return new BluetoothMediaEndpointServiceProviderImpl( | 308 return new BluetoothMediaEndpointServiceProviderImpl( |
| 311 bus, object_path, delegate); | 309 bus, object_path, delegate); |
| 312 } | 310 } |
| 313 // Returns a fake implementation. | 311 // Returns a fake implementation. |
| 314 return new FakeBluetoothMediaEndpointServiceProvider(object_path, delegate); | 312 return new FakeBluetoothMediaEndpointServiceProvider(object_path, delegate); |
| 315 } | 313 } |
| 316 | 314 |
| 317 } // namespace chromeos | 315 } // namespace chromeos |
| OLD | NEW |