OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_H_ | 5 #ifndef CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_H_ |
6 #define CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_H_ | 6 #define CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/manual_constructor.h" | 10 #include "base/memory/manual_constructor.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 MediaSinkInternal(const MediaSink& sink, const DialSinkExtraData& dial_data); | 66 MediaSinkInternal(const MediaSink& sink, const DialSinkExtraData& dial_data); |
67 MediaSinkInternal(const MediaSink& sink, const CastSinkExtraData& cast_data); | 67 MediaSinkInternal(const MediaSink& sink, const CastSinkExtraData& cast_data); |
68 | 68 |
69 // Used to push instance of this class into vector. | 69 // Used to push instance of this class into vector. |
70 MediaSinkInternal(const MediaSinkInternal& other); | 70 MediaSinkInternal(const MediaSinkInternal& other); |
71 | 71 |
72 ~MediaSinkInternal(); | 72 ~MediaSinkInternal(); |
73 | 73 |
74 MediaSinkInternal& operator=(const MediaSinkInternal& other); | 74 MediaSinkInternal& operator=(const MediaSinkInternal& other); |
75 bool operator==(const MediaSinkInternal& other) const; | 75 bool operator==(const MediaSinkInternal& other) const; |
| 76 bool operator!=(const MediaSinkInternal& other) const; |
| 77 // Sorted by sink id. |
| 78 bool operator<(const MediaSinkInternal& other) const; |
76 | 79 |
77 // Used by mojo. | 80 // Used by mojo. |
78 void set_sink_id(const MediaSink::Id& sink_id) { sink_.set_sink_id(sink_id); } | 81 void set_sink_id(const MediaSink::Id& sink_id) { sink_.set_sink_id(sink_id); } |
79 void set_name(const std::string& name) { sink_.set_name(name); } | 82 void set_name(const std::string& name) { sink_.set_name(name); } |
80 void set_description(const std::string& description) { | 83 void set_description(const std::string& description) { |
81 sink_.set_description(description); | 84 sink_.set_description(description); |
82 } | 85 } |
83 void set_domain(const std::string& domain) { sink_.set_domain(domain); } | 86 void set_domain(const std::string& domain) { sink_.set_domain(domain); } |
84 void set_icon_type(MediaSink::IconType icon_type) { | 87 void set_icon_type(MediaSink::IconType icon_type) { |
85 sink_.set_icon_type(icon_type); | 88 sink_.set_icon_type(icon_type); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 base::ManualConstructor<DialSinkExtraData> dial_data_; | 122 base::ManualConstructor<DialSinkExtraData> dial_data_; |
120 | 123 |
121 // Set if sink is Cast sink. | 124 // Set if sink is Cast sink. |
122 base::ManualConstructor<CastSinkExtraData> cast_data_; | 125 base::ManualConstructor<CastSinkExtraData> cast_data_; |
123 }; | 126 }; |
124 }; | 127 }; |
125 | 128 |
126 } // namespace media_router | 129 } // namespace media_router |
127 | 130 |
128 #endif // CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_H_ | 131 #endif // CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_H_ |
OLD | NEW |