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 COMPONENTS_MEDIA_ROUTER_MEDIA_SINK_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 6 #define COMPONENTS_MEDIA_ROUTER_MEDIA_SINK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/optional.h" | 10 #include "base/optional.h" |
11 #include "third_party/icu/source/common/unicode/uversion.h" | 11 #include "third_party/icu/source/common/unicode/uversion.h" |
12 | 12 |
13 namespace U_ICU_NAMESPACE { | 13 namespace U_ICU_NAMESPACE { |
14 class Collator; | 14 class Collator; |
15 } // namespace U_ICU_NAMESPACE | 15 } // namespace U_ICU_NAMESPACE |
16 | 16 |
17 namespace media_router { | 17 namespace media_router { |
18 | 18 |
19 // Represents a sink to which media can be routed. | 19 // Represents a sink to which media can be routed. |
20 // TODO(zhaobin): convert MediaSink into a struct. | 20 // TODO(zhaobin): convert MediaSink into a struct. |
21 class MediaSink { | 21 class MediaSink { |
22 public: | 22 public: |
23 using Id = std::string; | 23 using Id = std::string; |
24 | 24 |
25 // IconTypes are listed in the order in which sinks should be sorted. | 25 // IconTypes are listed in the order in which sinks should be sorted. |
26 // The order must stay in sync with | 26 // The order must stay in sync with |
27 // chrome/browser/resources/media_router/media_router_data.js. | 27 // chrome/browser/resources/media_router/media_router_data.js. |
28 enum IconType { | 28 enum IconType { |
29 CAST, | 29 CAST, |
30 CAST_AUDIO_GROUP, | 30 CAST_AUDIO_GROUP, |
31 CAST_AUDIO, | 31 CAST_AUDIO, |
| 32 MEETING, |
32 HANGOUT, | 33 HANGOUT, |
33 GENERIC | 34 GENERIC |
34 }; | 35 }; |
35 | 36 |
36 MediaSink(const MediaSink::Id& sink_id, | 37 MediaSink(const MediaSink::Id& sink_id, |
37 const std::string& name, | 38 const std::string& name, |
38 const IconType icon_type); | 39 const IconType icon_type); |
39 MediaSink(const MediaSink& other); | 40 MediaSink(const MediaSink& other); |
40 MediaSink(); | 41 MediaSink(); |
41 | 42 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 92 |
92 // Optional domain of the MediaSink. | 93 // Optional domain of the MediaSink. |
93 base::Optional<std::string> domain_; | 94 base::Optional<std::string> domain_; |
94 | 95 |
95 // The type of icon that corresponds with the MediaSink. | 96 // The type of icon that corresponds with the MediaSink. |
96 IconType icon_type_ = IconType::GENERIC; | 97 IconType icon_type_ = IconType::GENERIC; |
97 }; | 98 }; |
98 | 99 |
99 } // namespace media_router | 100 } // namespace media_router |
100 | 101 |
101 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 102 #endif // COMPONENTS_MEDIA_ROUTER_MEDIA_SINK_H_ |
OLD | NEW |