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

Unified Diff: chrome/browser/media/router/media_routes_observer.h

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fixes 3 * WITH UI Changes Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/media_routes_observer.h
diff --git a/chrome/browser/media/router/media_routes_observer.h b/chrome/browser/media/router/media_routes_observer.h
index c9a140fa12c7dd1d42b762ea6f5f3013d2f0a487..c667350aecf620f42d66168244425fa022f0d2bb 100644
--- a/chrome/browser/media/router/media_routes_observer.h
+++ b/chrome/browser/media/router/media_routes_observer.h
@@ -18,18 +18,29 @@ class MediaRouter;
// MediaSinks have been updated.
mark a. foltz 2015/12/16 07:17:35 The meaning of the media_source ctor parameter nee
matt.boetger 2015/12/18 23:37:15 Done.
class MediaRoutesObserver {
public:
- explicit MediaRoutesObserver(MediaRouter* router);
+ explicit MediaRoutesObserver(MediaRouter* router) :
+ MediaRoutesObserver(router, MediaSource::Id()) {}
+ explicit MediaRoutesObserver(MediaRouter* router,
mark a. foltz 2015/12/16 07:17:35 explicit is not necessary for a two-arg ctor.
matt.boetger 2015/12/18 23:37:15 Done.
+ const MediaSource::Id source_id);
virtual ~MediaRoutesObserver();
// Invoked when the list of routes and their associated sinks have been
- // updated.
+ // updated with the context of the |source_id|. This will return a list of
+ // |routes| and a list of |joinable_route_ids|. A route is joinable only if
+ // it is joinable in the context of the |source_id|.
// Implementations may not perform operations that modify the Media Router's
// observer list. In particular, invoking this observer's destructor within
// OnRoutesUpdated will result in undefined behavior.
- virtual void OnRoutesUpdated(const std::vector<MediaRoute>& routes) {}
+ virtual void OnRoutesUpdated(
+ const std::vector<MediaRoute>& routes,
+ const std::vector<MediaRoute::Id>& joinable_route_ids =
+ std::vector<MediaRoute::Id>()) {}
matt.boetger 2015/12/18 23:37:15 Are default parameters not allowed everywhere, or
imcheng 2015/12/21 20:00:35 Default arguments are not allowed in functions, bu
matt.boetger 2015/12/22 20:44:51 Thanks for the link. I removed the default parame
+
+ const MediaSource::Id source_id() const { return source_id_; }
private:
MediaRouter* router_;
+ const MediaSource::Id source_id_;
DISALLOW_COPY_AND_ASSIGN(MediaRoutesObserver);
};

Powered by Google App Engine
This is Rietveld 408576698