OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace media_router { | 10 namespace media_router { |
11 | 11 |
12 // Represents a sink to which media can be routed. | 12 // Represents a sink to which media can be routed. |
13 class MediaSink { | 13 class MediaSink { |
14 public: | 14 public: |
15 using Id = std::string; | 15 using Id = std::string; |
16 | 16 |
17 MediaSink(const MediaSink::Id& sink_id, const std::string& name); | 17 MediaSink(const MediaSink::Id& sink_id, |
| 18 const std::string& name); |
| 19 |
| 20 MediaSink(const MediaSink::Id& sink_id, |
| 21 const std::string& name, |
| 22 bool is_launching); |
18 | 23 |
19 ~MediaSink(); | 24 ~MediaSink(); |
20 | 25 |
21 const MediaSink::Id& id() const { return sink_id_; } | 26 const MediaSink::Id& id() const { return sink_id_; } |
22 const std::string& name() const { return name_; } | 27 const std::string& name() const { return name_; } |
| 28 bool is_launching() const { return is_launching_; } |
23 | 29 |
24 bool Equals(const MediaSink& other) const; | 30 bool Equals(const MediaSink& other) const; |
25 bool Empty() const; | 31 bool Empty() const; |
26 | 32 |
27 private: | 33 private: |
28 // Unique identifier for the MediaSink. | 34 // Unique identifier for the MediaSink. |
29 MediaSink::Id sink_id_; | 35 MediaSink::Id sink_id_; |
30 // Descriptive name of the MediaSink. | 36 // Descriptive name of the MediaSink. |
31 // Optional, can use an empty string if no sink name is available. | 37 // Optional, can use an empty string if no sink name is available. |
32 std::string name_; | 38 std::string name_; |
| 39 // True when the media router is creating a route to this sink. |
| 40 bool is_launching_; |
33 }; | 41 }; |
34 | 42 |
35 } // namespace media_router | 43 } // namespace media_router |
36 | 44 |
37 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 45 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ |
OLD | NEW |