Chromium Code Reviews| Index: chromeos/dbus/fake_bluetooth_media_transport_client.h |
| diff --git a/chromeos/dbus/fake_bluetooth_media_transport_client.h b/chromeos/dbus/fake_bluetooth_media_transport_client.h |
| index 319b2ae3c4e0518d527936f0c323e82f87d71856..fa27ee9e8604fb6299acf31513509c4c71614362 100644 |
| --- a/chromeos/dbus/fake_bluetooth_media_transport_client.h |
| +++ b/chromeos/dbus/fake_bluetooth_media_transport_client.h |
| @@ -9,6 +9,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/files/file.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/observer_list.h" |
| #include "chromeos/chromeos_export.h" |
| @@ -76,7 +77,12 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient |
| void SetVolume(const dbus::ObjectPath& endpoint_path, |
| const uint16_t& volume); |
| - // Gets the transport path associated with the given endpoint path. |
| + // Writes bytes to the input file descriptor, |input_fd|, accosiated with a |
|
armansito
2015/03/12 03:42:54
nit: s/accosiated/associated. Try pronouncing your
Miao
2015/03/12 22:33:31
:P
|
| + // Transport object which is bound to |endpoint_path|. |
|
armansito
2015/03/12 03:42:54
nit: s/Transport/transport/. Lowercase, because yo
Miao
2015/03/12 22:33:31
Done.
|
| + void WriteData(const dbus::ObjectPath& endpoint_path, |
| + const std::vector<char>& bytes); |
| + |
| + // Retrieves the transport object path bound to |endpoint_path|. |
| dbus::ObjectPath GetTransportPath(const dbus::ObjectPath& endpoint_path); |
| // Gets the endpoint path associated with the given transport_path. |
| @@ -86,8 +92,7 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient |
| // This class is used for simulating the scenario where each media endpoint |
| // has a corresponding transport path and properties. Once an endpoint is |
| // assigned with a transport path, an object of Transport is created. |
| - class Transport { |
| - public: |
| + struct Transport { |
| Transport(const dbus::ObjectPath& transport_path, |
| Properties* transport_properties); |
| ~Transport(); |
| @@ -97,11 +102,18 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient |
| // The property set bound with |path|. |
| scoped_ptr<Properties> properties; |
| + |
| + // File descriptor for simulating data available event. |input_fd| |
| + // will be initialized when Acquire/TryAcquire is called. |
|
armansito
2015/03/12 03:42:54
I would also say here that this is the internal en
Miao
2015/03/12 22:33:31
Done.
|
| + scoped_ptr<base::File> input_fd; |
| }; |
| // Property callback passed while a Properties structure is created. |
| void OnPropertyChanged(const std::string& property_name); |
| + // Retrieves the transport structure bound to |endpoint_path| |
| + Transport* GetTransport(const dbus::ObjectPath& endpoint_path); |
| + |
| // Map of endpoints with valid transport. Each pair is composed of an endpoint |
| // path and a Transport structure containing a transport path and its |
| // properties. |
| @@ -112,9 +124,6 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient |
| // corresponding endpoint path when GetProperties() is called. |
| std::map<dbus::ObjectPath, dbus::ObjectPath> transport_to_endpoint_map_; |
| - // The path of the media transport object. |
| - dbus::ObjectPath object_path_; |
| - |
| ObserverList<BluetoothMediaTransportClient::Observer> observers_; |
| DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaTransportClient); |