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

Unified Diff: chromeos/dbus/fake_bluetooth_media_client.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/dbus/fake_bluetooth_media_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_bluetooth_media_client.h
diff --git a/chromeos/dbus/fake_bluetooth_media_client.h b/chromeos/dbus/fake_bluetooth_media_client.h
index ff182e734ee4aa3b366c598f2b639a381eee94db..c9649e65c910a0912e9527ae6dec2f9c0b299ce9 100644
--- a/chromeos/dbus/fake_bluetooth_media_client.h
+++ b/chromeos/dbus/fake_bluetooth_media_client.h
@@ -15,6 +15,8 @@
namespace chromeos {
+class FakeBluetoothMediaEndpointServiceProvider;
+
class CHROMEOS_EXPORT FakeBluetoothMediaClient : public BluetoothMediaClient {
public:
// The default codec is SBC(0x00).
@@ -43,9 +45,13 @@ class CHROMEOS_EXPORT FakeBluetoothMediaClient : public BluetoothMediaClient {
// events.
void SetVisible(bool visible);
- // Sets the registration state for a given media endpoint path.
- void SetEndpointRegistered(const dbus::ObjectPath& endpoint_path,
- bool registered);
+ // Sets the registration state for a given media endpoint.
+ void SetEndpointRegistered(
+ FakeBluetoothMediaEndpointServiceProvider* endpoint,
+ bool registered);
+
+ // Indicates whether the given endpoint path is registered or not.
+ bool IsRegistered(const dbus::ObjectPath& endpoint_path);
private:
// Indicates whether the media object is visible or not.
@@ -54,9 +60,10 @@ class CHROMEOS_EXPORT FakeBluetoothMediaClient : public BluetoothMediaClient {
// The path of the media object.
dbus::ObjectPath object_path_;
- // Pairs of endpoint paths and bool values indicating whether or not endpoints
- // are registered.
- std::map<dbus::ObjectPath, bool> endpoints_;
+ // Map of registered endpoints. Each pair is composed of an endpoint path as
+ // key and a pointer to the endpoint as value.
+ std::map<dbus::ObjectPath, FakeBluetoothMediaEndpointServiceProvider*>
+ endpoints_;
// List of observers interested in event notifications from us.
ObserverList<BluetoothMediaClient::Observer> observers_;
« no previous file with comments | « no previous file | chromeos/dbus/fake_bluetooth_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698