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 using MediaSinkId = std::string; | |
| 15 | |
| 16 // Represents a sink to which media can be routed. | |
| 17 class MediaSink { | |
|
xhwang
2015/03/05 22:28:50
ditto: should this be a struct?
Kevin M
2015/03/06 23:12:45
Done.
| |
| 18 public: | |
| 19 // |sink_id|: Unique identifier for the MediaSink. | |
| 20 // |name|: Descriptive name of the MediaSink. | |
| 21 // |status|: Current status of the MediaSink. | |
|
xhwang
2015/03/05 22:28:50
There's no |status| in the constructor.
Kevin M
2015/03/06 23:12:45
Done.
| |
| 22 MediaSink(const MediaSinkId& sink_id, | |
| 23 const std::string& name); | |
| 24 ~MediaSink(); | |
| 25 | |
| 26 const MediaSinkId& sink_id() const { return sink_id_; } | |
| 27 const std::string& name() const { return name_; } | |
| 28 std::string StatusAsString() const; | |
|
xhwang
2015/03/05 22:28:50
This is not defined? Remove or define it?
Kevin M
2015/03/06 23:12:45
Done.
| |
| 29 | |
| 30 bool operator==(const MediaSink& other) const; | |
| 31 bool operator!=(const MediaSink& other) const; | |
|
xhwang
2015/03/05 22:28:50
ditto about operator overloading...
Kevin M
2015/03/06 23:12:45
Done.
| |
| 32 | |
| 33 private: | |
| 34 const MediaSinkId sink_id_; | |
| 35 const std::string name_; | |
| 36 }; | |
| 37 | |
| 38 } // namespace media_router | |
| 39 | |
| 40 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | |
| OLD | NEW |