Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome/browser/media/router/media_route.h

Issue 2731043002: [Media Router] Add a presentation id to MediaRoute mapping in the MR (Closed)
Patch Set: resolve code review comments from Derek Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bool for_display() const { return for_display_; } 84 bool for_display() const { return for_display_; }
85 85
86 void set_incognito(bool is_incognito) { is_incognito_ = is_incognito; } 86 void set_incognito(bool is_incognito) { is_incognito_ = is_incognito; }
87 bool is_incognito() const { return is_incognito_; } 87 bool is_incognito() const { return is_incognito_; }
88 88
89 void set_offscreen_presentation(bool is_offscreen_presentation) { 89 void set_offscreen_presentation(bool is_offscreen_presentation) {
90 is_offscreen_presentation_ = is_offscreen_presentation; 90 is_offscreen_presentation_ = is_offscreen_presentation;
91 } 91 }
92 bool is_offscreen_presentation() const { return is_offscreen_presentation_; } 92 bool is_offscreen_presentation() const { return is_offscreen_presentation_; }
93 93
94 void set_presentation_id(const std::string& presentation_id) {
95 presentation_id_ = presentation_id;
96 }
97 const base::Optional<std::string>& presentation_id() const {
98 return presentation_id_;
99 }
100
94 bool Equals(const MediaRoute& other) const; 101 bool Equals(const MediaRoute& other) const;
95 102
96 private: 103 private:
97 // The media route identifier. 104 // The media route identifier.
98 MediaRoute::Id media_route_id_; 105 MediaRoute::Id media_route_id_;
99 106
100 // The media source being routed. 107 // The media source being routed.
101 MediaSource media_source_; 108 MediaSource media_source_;
102 109
103 // The ID of sink being routed to. 110 // The ID of sink being routed to.
(...skipping 14 matching lines...) Expand all
118 125
119 // |true| if the route can be displayed in the UI. 126 // |true| if the route can be displayed in the UI.
120 bool for_display_ = false; 127 bool for_display_ = false;
121 128
122 // |true| if the route was created by an incognito profile. 129 // |true| if the route was created by an incognito profile.
123 bool is_incognito_ = false; 130 bool is_incognito_ = false;
124 131
125 // |true| if the presentation associated with this route is an offscreen 132 // |true| if the presentation associated with this route is an offscreen
126 // presentation. 133 // presentation.
127 bool is_offscreen_presentation_ = false; 134 bool is_offscreen_presentation_ = false;
135
136 // Presentation id associated with this media route object.
137 base::Optional<std::string> presentation_id_;
128 }; 138 };
129 139
130 } // namespace media_router 140 } // namespace media_router
131 141
132 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ 142 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/router/media_router.h » ('j') | chrome/browser/media/router/media_router_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698