Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc

Issue 939753004: device/bluetooth: Implement Unregister() of BlueotoothAudioSinkChromeOS and disconnection-related c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved kInvalidVolume to BluetoothAudioSink. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc
diff --git a/chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc b/chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc
index 31f8361b72811fcdd6da2d2479acdbff1065f669..a275374816e06130bab0ae5d3e3b657dcc7c0ac8 100644
--- a/chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc
+++ b/chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc
@@ -30,12 +30,6 @@ void FakeBluetoothMediaEndpointServiceProvider::SetConfiguration(
VLOG(1) << object_path_.value() << ": SetConfiguration for "
<< transport_path.value();
- // Makes the transport object valid for the given endpoint path.
- FakeBluetoothMediaTransportClient* transport =
- static_cast<FakeBluetoothMediaTransportClient*>(
- DBusThreadManager::Get()->GetBluetoothMediaTransportClient());
- transport->SetValid(object_path_, true);
-
delegate_->SetConfiguration(transport_path, properties);
}
@@ -43,18 +37,28 @@ void FakeBluetoothMediaEndpointServiceProvider::SelectConfiguration(
const std::vector<uint8_t>& capabilities,
const Delegate::SelectConfigurationCallback& callback) {
VLOG(1) << object_path_.value() << ": SelectConfiguration";
+
delegate_->SelectConfiguration(capabilities, callback);
+
+ // Makes the transport object valid for the given endpoint path.
+ FakeBluetoothMediaTransportClient* transport =
+ static_cast<FakeBluetoothMediaTransportClient*>(
+ DBusThreadManager::Get()->GetBluetoothMediaTransportClient());
+ DCHECK(transport);
+ transport->SetValid(this, true);
}
void FakeBluetoothMediaEndpointServiceProvider::ClearConfiguration(
const ObjectPath& transport_path) {
VLOG(1) << object_path_.value() << ": ClearConfiguration on "
<< transport_path.value();
+
delegate_->ClearConfiguration(transport_path);
}
void FakeBluetoothMediaEndpointServiceProvider::Released() {
VLOG(1) << object_path_.value() << ": Released";
+
delegate_->Released();
}

Powered by Google App Engine
This is Rietveld 408576698