Chromium Code Reviews| Index: chrome/browser/media/router/media_router.h |
| diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h |
| index 92d6d068729e7e475d55f696e57c6cd04a6179ed..1084ef7e568cee410ca063fc6384b57a5c163058 100644 |
| --- a/chrome/browser/media/router/media_router.h |
| +++ b/chrome/browser/media/router/media_router.h |
| @@ -59,6 +59,7 @@ using PresentationConnectionStateSubscription = base::CallbackList<void( |
| class MediaRouter : public KeyedService { |
| public: |
| using SendRouteMessageCallback = base::Callback<void(bool sent)>; |
| + using MediaSinkList = std::vector<std::unique_ptr<MediaSink>>; |
|
mark a. foltz
2017/02/10 01:23:55
Should MediaSink be move-only? Or is there a use c
imcheng
2017/02/10 22:45:18
I think this just needs to be updated according to
zhaobin
2017/02/16 22:56:35
Done.
|
| ~MediaRouter() override = default; |
| @@ -168,6 +169,10 @@ class MediaRouter : public KeyedService { |
| const std::string& domain, |
| const MediaSinkSearchResponseCallback& sink_callback) = 0; |
| + // Called when DIAL or CAST MediaSinkService finishes sink discovery. |
|
mark a. foltz
2017/02/10 01:23:55
Are there multiple services running at once? Do
imcheng
2017/02/10 22:45:18
It seems this will be called directly by each serv
zhaobin
2017/02/16 22:56:35
Done.
|
| + // |sinks|: sinks discovered by MediaSinkService. |
| + virtual void OnSinksDiscovered(std::unique_ptr<MediaSinkList> sinks) = 0; |
|
mark a. foltz
2017/02/10 01:23:55
Passing a std::vector by unique_ptr isn't common.
imcheng
2017/02/10 22:45:18
I don't think a vector<unique_ptr<T>> is copyable
zhaobin
2017/02/16 22:56:35
Done.
|
| + |
| // Adds |callback| to listen for state changes for presentation connected to |
| // |route_id|. The returned Subscription object is owned by the caller. |
| // |callback| will be invoked whenever there are state changes, until the |