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

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

Issue 1805813002: [Media Router] Wiring for searching route providers for new sinks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 f8d6f283b909d493288100bad1c912a6994b03c6..ee22364159560ae8d0a62535ea959cd0d6065936 100644
--- a/chrome/browser/media/router/media_router.h
+++ b/chrome/browser/media/router/media_router.h
@@ -31,8 +31,10 @@ namespace media_router {
class IssuesObserver;
class MediaRoutesObserver;
class MediaSinksObserver;
+class MediaSinksSearchRequest;
class PresentationConnectionStateObserver;
class PresentationSessionMessagesObserver;
+class QueryResultManager;
class RouteRequestResult;
// Type of callback used in |CreateRoute()|, |JoinRoute()|, and
@@ -164,6 +166,7 @@ class MediaRouter : public KeyedService {
friend class MediaRoutesObserver;
friend class PresentationConnectionStateObserver;
friend class PresentationSessionMessagesObserver;
+ friend class QueryResultManager;
// The following functions are called by friend Observer classes above.
@@ -185,6 +188,18 @@ class MediaRouter : public KeyedService {
// receiving further updates.
virtual void UnregisterMediaSinksObserver(MediaSinksObserver* observer) = 0;
+ // Registers |request| with this MediaRouter. |request| specifies a media
+ // source and a sink ID. The MediaRouter will ask the Media Router Provider
+ // Manager to search for sinks matching the sink ID that also support the
+ // media source. |request| will be notified when the MRPM responds and then it
+ // will be destroyed.
+ // Multiple requests can be registered for the same sink ID. Only one query
+ // per sink ID will be pending at one time.
+ // The implementation can reject the request to search in which case it will
+ // notify the caller by returning |false|.
+ virtual bool RegisterMediaSinksSearchRequest(
+ scoped_ptr<MediaSinksSearchRequest> request) = 0;
+
// Adds a MediaRoutesObserver to listen for updates on MediaRoutes.
// The initial update may happen synchronously.
// MediaRouter does not own |observer|. |UnregisterMediaRoutesObserver| should
« no previous file with comments | « no previous file | chrome/browser/media/router/media_router.gypi » ('j') | chrome/browser/media/router/media_router.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698