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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
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/fake_bluetooth_media_endpoint_service_provider.h" 5 #include "chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.h"
6 6
7 #include "chromeos/dbus/dbus_thread_manager.h" 7 #include "chromeos/dbus/dbus_thread_manager.h"
8 #include "chromeos/dbus/fake_bluetooth_media_client.h" 8 #include "chromeos/dbus/fake_bluetooth_media_client.h"
9 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h" 9 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h"
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 void FakeBluetoothMediaEndpointServiceProvider::SelectConfiguration( 42 void FakeBluetoothMediaEndpointServiceProvider::SelectConfiguration(
43 const std::vector<uint8_t>& capabilities, 43 const std::vector<uint8_t>& capabilities,
44 const Delegate::SelectConfigurationCallback& callback) { 44 const Delegate::SelectConfigurationCallback& callback) {
45 VLOG(1) << object_path_.value() << ": SelectConfiguration"; 45 VLOG(1) << object_path_.value() << ": SelectConfiguration";
46 delegate_->SelectConfiguration(capabilities, callback); 46 delegate_->SelectConfiguration(capabilities, callback);
47 } 47 }
48 48
49 void FakeBluetoothMediaEndpointServiceProvider::ClearConfiguration( 49 void FakeBluetoothMediaEndpointServiceProvider::ClearConfiguration(
50 const ObjectPath& transport_path) { 50 const ObjectPath& transport_path) {
51 if (transport_path !=
52 ObjectPath(FakeBluetoothMediaTransportClient::kTransportPath))
53 return;
54
51 VLOG(1) << object_path_.value() << ": ClearConfiguration on " 55 VLOG(1) << object_path_.value() << ": ClearConfiguration on "
52 << transport_path.value(); 56 << transport_path.value();
57
58 // Makes the transport object invalid for the given endpoint path.
59 FakeBluetoothMediaTransportClient* transport =
60 static_cast<FakeBluetoothMediaTransportClient*>(
61 DBusThreadManager::Get()->GetBluetoothMediaTransportClient());
62 transport->SetValid(object_path_, false);
armansito 2015/02/19 00:37:46 It's a bit strange that the endpoint service provi
Miao 2015/02/23 21:04:24 Right. Removed the test for this function, since C
63
53 delegate_->ClearConfiguration(transport_path); 64 delegate_->ClearConfiguration(transport_path);
54 } 65 }
55 66
56 void FakeBluetoothMediaEndpointServiceProvider::Released() { 67 void FakeBluetoothMediaEndpointServiceProvider::Released() {
57 VLOG(1) << object_path_.value() << ": Released"; 68 VLOG(1) << object_path_.value() << ": Released";
58 delegate_->Released(); 69 delegate_->Released();
59 } 70 }
60 71
61 } // namespace chromeos 72 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698