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

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: Marked TransportProperties struct with DISALLOW_COPY_AND_ASSIGN. 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_client.h
diff --git a/chromeos/dbus/fake_bluetooth_media_client.h b/chromeos/dbus/fake_bluetooth_media_client.h
index 496ff09f9c64d93b58440353e725b08537619f7f..f82d2dfc13d4a24527257dc81d39bec98a7b0a3b 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,24 @@ 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 SetEndpointState(const dbus::ObjectPath& endpoint_path, bool registered);
armansito 2015/02/12 05:20:44 Rename this to SetEndpointRegistered?
Miao 2015/02/12 19:08:03 Done.
+
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_;

Powered by Google App Engine
This is Rietveld 408576698