Chromium Code Reviews| Index: chrome/browser/media/router/mojo/media_router_mojo_impl.h |
| diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h |
| index 73d7187e6f62bfb30c800eb0ea41bf29b462bd12..e088195007c824e312fa95b6b3e85f602cbfb85e 100644 |
| --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h |
| +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h |
| @@ -177,6 +177,7 @@ class MediaRouterMojoImpl : public MediaRouterBase, |
| // Empty otherwise. |
| std::vector<MediaSink> cached_sink_list; |
| std::vector<url::Origin> origins; |
| + |
| base::ObserverList<MediaSinksObserver> observers; |
| private: |
| @@ -190,6 +191,15 @@ class MediaRouterMojoImpl : public MediaRouterBase, |
| // True if the query has been sent to the MRPM. False otherwise. |
| bool is_active = false; |
| + |
| + // True if cached result is available. |
| + bool has_cached_result = false; |
|
Wez
2017/03/04 02:07:32
nit: Since you have two cached-data fields below t
miu
2017/03/04 02:24:39
Done.
|
| + |
| + // Cached list of routes for the query, if |has_cached_result| is true. |
| + // Empty otherwise. |
| + std::vector<MediaRoute> cached_route_list; |
| + std::vector<std::string> joinable_route_ids; |
| + |
| base::ObserverList<MediaRoutesObserver> observers; |
| private: |
| @@ -232,6 +242,11 @@ class MediaRouterMojoImpl : public MediaRouterBase, |
| void RegisterRouteMessageObserver(RouteMessageObserver* observer) override; |
| void UnregisterRouteMessageObserver(RouteMessageObserver* observer) override; |
| + // Notifies |observer| of any existing cached routes, after registration. |
| + void NotifyOfExistingRoutesAfterRegistration( |
|
Wez
2017/03/04 02:07:32
This is a confusing name, IMO - I'd suggest either
miu
2017/03/04 02:24:39
Done.
|
| + const MediaSource::Id& source_id, |
| + MediaRoutesObserver* observer) const; |
| + |
| // These calls invoke methods in the component extension via Mojo. |
| void DoCreateRoute(const MediaSource::Id& source_id, |
| const MediaSink::Id& sink_id, |