Chromium Code Reviews| 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..26b8a0269fd22f91a817f01b85208dd7375013ca 100644 |
| --- a/chrome/browser/media/router/media_routes_observer.h |
| +++ b/chrome/browser/media/router/media_routes_observer.h |
| @@ -18,7 +18,8 @@ class MediaRouter; |
| // MediaSinks have been updated. |
| class MediaRoutesObserver { |
| public: |
| - explicit MediaRoutesObserver(MediaRouter* router); |
| + explicit MediaRoutesObserver(MediaRouter* router, |
| + const MediaSource::Id source_id = std::string("")); |
|
imcheng
2015/11/19 18:55:08
const MediaSource::Id& source_id = MediaSource::Id
matt.boetger
2015/11/24 19:45:23
Done.
|
| virtual ~MediaRoutesObserver(); |
| // Invoked when the list of routes and their associated sinks have been |
|
imcheng
2015/11/19 18:55:08
Could you update comments?
matt.boetger
2015/11/24 19:45:23
Done.
|
| @@ -26,10 +27,16 @@ class MediaRoutesObserver { |
| // 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 MediaSource::Id source_id, |
|
imcheng
2015/11/19 18:55:08
Is |source_id| needed? MR should ensure that |sour
matt.boetger
2015/11/24 19:45:23
Done.
|
| + const std::vector<MediaRoute>& routes, |
| + const std::vector<MediaRoute>& joinable_routes) {} |
| + |
| + const MediaSource::Id source_id() const { return source_id_; } |
| private: |
| MediaRouter* router_; |
| + const MediaSource::Id source_id_; |
| DISALLOW_COPY_AND_ASSIGN(MediaRoutesObserver); |
| }; |