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

Side by Side Diff: chrome/browser/media/router/media_router.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_ROUTER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 const content::PresentationConnectionStateChangedCallback& callback) = 0; 182 const content::PresentationConnectionStateChangedCallback& callback) = 0;
183 183
184 // Called when the incognito profile for this instance is being shut down. 184 // Called when the incognito profile for this instance is being shut down.
185 // This will terminate all incognito media routes. 185 // This will terminate all incognito media routes.
186 virtual void OnIncognitoProfileShutdown() = 0; 186 virtual void OnIncognitoProfileShutdown() = 0;
187 187
188 // Returns the media routes that currently exist. To get notified whenever 188 // Returns the media routes that currently exist. To get notified whenever
189 // there is a change to the media routes, subclass MediaRoutesObserver. 189 // there is a change to the media routes, subclass MediaRoutesObserver.
190 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0; 190 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0;
191 191
192 // Returns the MediaRoute associated with |presentation_id|. Returns nullptr
193 // if no such media route exists.
194 virtual const MediaRoute* GetPresentationRoute(
195 const std::string& presentation_id) const = 0;
196
197 // Finds an existing route with id equals to |route_id| and sets its
198 // |presentation_id| field to |presentation_id|. No op if such route does not
199 // exist.
200 virtual void SetPresentationId(const MediaRoute::Id& route_id,
201 const std::string& presentation_id) = 0;
202
192 private: 203 private:
193 friend class IssuesObserver; 204 friend class IssuesObserver;
194 friend class MediaSinksObserver; 205 friend class MediaSinksObserver;
195 friend class MediaRoutesObserver; 206 friend class MediaRoutesObserver;
196 friend class PresentationConnectionStateObserver; 207 friend class PresentationConnectionStateObserver;
197 friend class RouteMessageObserver; 208 friend class RouteMessageObserver;
198 209
199 // The following functions are called by friend Observer classes above. 210 // The following functions are called by friend Observer classes above.
200 211
201 // Registers |observer| with this MediaRouter. |observer| specifies a media 212 // Registers |observer| with this MediaRouter. |observer| specifies a media
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 256
246 // Unregisters a previously registered RouteMessagesObserver. |observer| will 257 // Unregisters a previously registered RouteMessagesObserver. |observer| will
247 // stop receiving further updates. 258 // stop receiving further updates.
248 virtual void UnregisterRouteMessageObserver( 259 virtual void UnregisterRouteMessageObserver(
249 RouteMessageObserver* observer) = 0; 260 RouteMessageObserver* observer) = 0;
250 }; 261 };
251 262
252 } // namespace media_router 263 } // namespace media_router
253 264
254 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 265 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698