Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "chrome/browser/media/router/media_route_id.h" | |
| 11 | |
| 12 namespace media_router { | |
| 13 | |
| 14 typedef std::string MediaSinkId; | |
| 15 | |
| 16 // Represents a sink to which media can be routed. | |
| 17 class MediaSink { | |
| 18 public: | |
| 19 enum Status { | |
|
mark a. foltz
2015/03/02 21:40:10
It would be a good idea to document the state tran
Kevin M
2015/03/03 21:53:19
Done.
| |
| 20 // The sink is currently not associated with any routes. | |
| 21 IDLE, | |
| 22 // The sink is currently associated with a route. | |
| 23 ACTIVE, | |
| 24 // The sink has a pending route request. | |
| 25 REQUEST_PENDING | |
|
mark a. foltz
2015/03/02 21:40:10
Can a sink ever have a request pending while it is
Kevin M
2015/03/03 21:53:19
I talked this over with imcheng and he's thinking
| |
| 26 }; | |
| 27 | |
| 28 // |sink_id|: Unique identifier for the MediaSink. | |
| 29 // |name|: Descriptive name of the MediaSink. | |
|
mark a. foltz
2015/03/02 21:40:09
Does this represent a localized string? If so, is
Kevin M
2015/03/03 21:53:20
The string data we get from Mojo is a UTF-8 encode
mark a. foltz
2015/03/04 06:22:58
We should touch base about rendering requirements
Kevin M
2015/03/04 23:33:32
Sure, I'll talk to you in person, maybe including
| |
| 30 // |status|: Current status of the MediaSink. | |
| 31 MediaSink(const MediaSinkId& sink_id, | |
| 32 const std::string& name, | |
| 33 Status status); | |
| 34 ~MediaSink(); | |
| 35 | |
| 36 const MediaSinkId& sink_id() const { return sink_id_; } | |
| 37 const std::string& name() const { return name_; } | |
| 38 Status status() const { return status_; } | |
| 39 std::string StatusAsString() const; | |
| 40 | |
| 41 bool operator==(const MediaSink& other) const; | |
| 42 bool operator!=(const MediaSink& other) const; | |
| 43 | |
| 44 private: | |
| 45 MediaSinkId sink_id_; | |
| 46 std::string name_; | |
| 47 Status status_; | |
| 48 }; | |
| 49 | |
| 50 } // namespace media_router | |
| 51 | |
| 52 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | |
| OLD | NEW |