| 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..1d49643c1d727f28b62cce21223e857aef8a8a0b 100644
|
| --- a/chrome/browser/media/router/media_routes_observer.h
|
| +++ b/chrome/browser/media/router/media_routes_observer.h
|
| @@ -18,18 +18,26 @@ class MediaRouter;
|
| // MediaSinks have been updated.
|
| class MediaRoutesObserver {
|
| public:
|
| - explicit MediaRoutesObserver(MediaRouter* router);
|
| + explicit MediaRoutesObserver(MediaRouter* router,
|
| + const MediaSource::Id source_id = MediaSource::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) {}
|
| +
|
| + const MediaSource::Id source_id() const { return source_id_; }
|
|
|
| private:
|
| MediaRouter* router_;
|
| + const MediaSource::Id source_id_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MediaRoutesObserver);
|
| };
|
|
|