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_ROUTE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/small_map.h" | 10 #include "base/containers/small_map.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 // Set to |true| if the presentation associated with this route is an | 81 // Set to |true| if the presentation associated with this route is an |
82 // offscreen presentation. | 82 // offscreen presentation. |
83 void set_offscreen_presentation(bool is_offscreen_presentation) { | 83 void set_offscreen_presentation(bool is_offscreen_presentation) { |
84 is_offscreen_presentation_ = is_offscreen_presentation; | 84 is_offscreen_presentation_ = is_offscreen_presentation; |
85 } | 85 } |
86 | 86 |
87 bool is_offscreen_presentation() const { return is_offscreen_presentation_; } | 87 bool is_offscreen_presentation() const { return is_offscreen_presentation_; } |
88 | 88 |
89 bool Equals(const MediaRoute& other) const; | 89 bool Equals(const MediaRoute& other) const; |
90 | 90 |
91 // Used by Mojo. | |
92 MediaRoute(); | |
mark a. foltz
2017/02/07 00:57:43
This should go with the declarations of other ctor
imcheng
2017/02/07 01:36:04
Done.
| |
93 void set_media_route_id(const MediaRoute::Id& media_route_id) { | |
mark a. foltz
2017/02/07 00:57:43
Is there a reason this can't be a simple struct wi
imcheng
2017/02/07 01:36:04
In its current state, yes we can turn this into a
mark a. foltz
2017/02/07 20:02:48
OK. That will require rethinking the Media Route
| |
94 media_route_id_ = media_route_id; | |
95 } | |
96 void set_media_source(const MediaSource& media_source) { | |
97 media_source_ = media_source; | |
98 } | |
99 void set_media_sink_id(const MediaSink::Id& media_sink_id) { | |
100 media_sink_id_ = media_sink_id; | |
101 } | |
102 void set_description(const std::string& description) { | |
103 description_ = description; | |
104 } | |
105 void set_local(bool is_local) { is_local_ = is_local; } | |
106 void set_custom_controller_path(const std::string& custom_controller_path) { | |
107 custom_controller_path_ = custom_controller_path; | |
108 } | |
109 void set_for_display(bool for_display) { for_display_ = for_display; } | |
110 | |
91 private: | 111 private: |
92 MediaRoute::Id media_route_id_; | 112 MediaRoute::Id media_route_id_; |
93 MediaSource media_source_; | 113 MediaSource media_source_; |
94 MediaSink::Id media_sink_id_; | 114 MediaSink::Id media_sink_id_; |
95 std::string description_; | 115 std::string description_; |
96 bool is_local_; | 116 bool is_local_ = false; |
97 std::string custom_controller_path_; | 117 std::string custom_controller_path_; |
98 bool for_display_; | 118 bool for_display_ = false; |
99 bool is_incognito_; | 119 bool is_incognito_ = false; |
100 bool is_offscreen_presentation_; | 120 bool is_offscreen_presentation_ = false; |
101 }; | 121 }; |
102 | 122 |
103 } // namespace media_router | 123 } // namespace media_router |
104 | 124 |
105 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ | 125 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ |
OLD | NEW |