Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: chrome/browser/media/router/media_router.h

Issue 2679893002: [Media Router] Add ProvideSinks() Mojo API (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « no previous file | chrome/browser/media/router/mock_media_router.h » ('j') | chrome/browser/media/router/mojo/media_router.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698