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

Unified Diff: chromeos/dbus/fake_bluetooth_media_client.h

Issue 910023002: device/bluetooth:Implement BluetoothMediaEndpointServiceProvider delegate and media-related overrid… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the addition/removal of all types of observer to constructor/destructor. 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 | « chromeos/dbus/bluetooth_media_transport_client.cc ('k') | 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 496ff09f9c64d93b58440353e725b08537619f7f..ff182e734ee4aa3b366c598f2b639a381eee94db 100644
--- a/chromeos/dbus/fake_bluetooth_media_client.h
+++ b/chromeos/dbus/fake_bluetooth_media_client.h
@@ -5,6 +5,8 @@
#ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_
#define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_
+#include <map>
+
#include "base/callback.h"
#include "base/observer_list.h"
#include "chromeos/chromeos_export.h"
@@ -37,7 +39,25 @@ class CHROMEOS_EXPORT FakeBluetoothMediaClient : public BluetoothMediaClient {
const base::Closure& callback,
const ErrorCallback& error_callback) override;
+ // Makes the media object visible/invisible to emulate the addition/removal
+ // events.
+ void SetVisible(bool visible);
+
+ // Sets the registration state for a given media endpoint path.
+ void SetEndpointRegistered(const dbus::ObjectPath& endpoint_path,
+ bool registered);
+
private:
+ // Indicates whether the media object is visible or not.
+ bool visible_;
+
+ // 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_;
+
// List of observers interested in event notifications from us.
ObserverList<BluetoothMediaClient::Observer> observers_;
« no previous file with comments | « chromeos/dbus/bluetooth_media_transport_client.cc ('k') | chromeos/dbus/fake_bluetooth_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698