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

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: 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..69b8d3369e8a3be2d8cccf251ff8a7c042f5e45e 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,23 @@ 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 visibility for a given media endpoint path.
+ void SetEndpointVisible(const dbus::ObjectPath& endpoint_path, bool visible);
+
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 their visibility.
armansito 2015/02/10 00:17:01 I find this confusing since you're using "visible"
Miao 2015/02/10 22:15:21 I shouldn't use visibility here, and yes, this ind
+ 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