Chromium Code Reviews| Index: chrome/browser/media/router/mojo/media_route_controller.h |
| diff --git a/chrome/browser/media/router/mojo/media_route_controller.h b/chrome/browser/media/router/mojo/media_route_controller.h |
| index 5a5fab0bc132e11c94d9715cc02d71e9f550a224..ff6e2dc3502a7f76a10ef7cb4242c3820cacb7c5 100644 |
| --- a/chrome/browser/media/router/mojo/media_route_controller.h |
| +++ b/chrome/browser/media/router/mojo/media_route_controller.h |
| @@ -44,6 +44,10 @@ class MediaRouteController : public mojom::MediaStatusObserver, |
| // Removes itself as an observer if |controller_| is still valid. |
| virtual ~Observer(); |
| + // Notifies itself with the latest media status that the controller has |
| + // received. |
| + void CheckForMediaStatusUpdates(); |
|
mark a. foltz
2017/05/12 21:00:58
Is this necessary?
takumif
2017/05/12 22:20:58
Removed.
|
| + |
| virtual void OnMediaStatusUpdated(const MediaStatus& status) = 0; |
| // Returns a reference to the observed MediaRouteController. The reference |
| @@ -105,6 +109,10 @@ class MediaRouteController : public mojom::MediaStatusObserver, |
| void AddObserver(Observer* observer); |
| void RemoveObserver(Observer* observer); |
| + const base::Optional<MediaStatus>& current_media_status() const { |
| + return current_media_status_; |
| + } |
| + |
| // Called when the connection between |this| and the MediaControllerPtr or |
| // the MediaStatusObserver binding is no longer valid. Notifies |
| // |media_router_| and |observers_| to dispose their references to |this|. |
| @@ -129,6 +137,9 @@ class MediaRouteController : public mojom::MediaStatusObserver, |
| // This becomes false when the controller is invalidated. |
| bool is_valid_ = true; |
| + // The latest media status that the controller has been notified with. |
| + base::Optional<MediaStatus> current_media_status_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(MediaRouteController); |
| }; |