Update V8 to version 4.6.54.
[chromium-blink-merge.git] / chromeos / dbus / fake_bluetooth_media_endpoint_service_provider.cc
bloba275374816e06130bab0ae5d3e3b657dcc7c0ac8
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
3 // found in the LICENSE file.
5 #include "chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.h"
7 #include "chromeos/dbus/dbus_thread_manager.h"
8 #include "chromeos/dbus/fake_bluetooth_media_client.h"
9 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h"
11 using dbus::ObjectPath;
13 namespace chromeos {
15 FakeBluetoothMediaEndpointServiceProvider::
16 FakeBluetoothMediaEndpointServiceProvider(const ObjectPath& object_path,
17 Delegate* delegate)
18 : visible_(false), object_path_(object_path), delegate_(delegate) {
19 VLOG(1) << "Create Bluetooth Media Endpoint: " << object_path_.value();
22 FakeBluetoothMediaEndpointServiceProvider::
23 ~FakeBluetoothMediaEndpointServiceProvider() {
24 VLOG(1) << "Cleaning up Bluetooth Media Endpoint: " << object_path_.value();
27 void FakeBluetoothMediaEndpointServiceProvider::SetConfiguration(
28 const ObjectPath& transport_path,
29 const Delegate::TransportProperties& properties) {
30 VLOG(1) << object_path_.value() << ": SetConfiguration for "
31 << transport_path.value();
33 delegate_->SetConfiguration(transport_path, properties);
36 void FakeBluetoothMediaEndpointServiceProvider::SelectConfiguration(
37 const std::vector<uint8_t>& capabilities,
38 const Delegate::SelectConfigurationCallback& callback) {
39 VLOG(1) << object_path_.value() << ": SelectConfiguration";
41 delegate_->SelectConfiguration(capabilities, callback);
43 // Makes the transport object valid for the given endpoint path.
44 FakeBluetoothMediaTransportClient* transport =
45 static_cast<FakeBluetoothMediaTransportClient*>(
46 DBusThreadManager::Get()->GetBluetoothMediaTransportClient());
47 DCHECK(transport);
48 transport->SetValid(this, true);
51 void FakeBluetoothMediaEndpointServiceProvider::ClearConfiguration(
52 const ObjectPath& transport_path) {
53 VLOG(1) << object_path_.value() << ": ClearConfiguration on "
54 << transport_path.value();
56 delegate_->ClearConfiguration(transport_path);
59 void FakeBluetoothMediaEndpointServiceProvider::Released() {
60 VLOG(1) << object_path_.value() << ": Released";
62 delegate_->Released();
65 } // namespace chromeos