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

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: Comments and tests Created 4 years, 8 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 c7b68d4dc7260a8a53c1604404ef71a59b456c84..6ed95813c22217e170eb3cdf281e1a2ea2866405 100644
--- a/chrome/browser/media/router/media_router.h
+++ b/chrome/browser/media/router/media_router.h
@@ -43,6 +43,12 @@ class RouteRequestResult;
using MediaRouteResponseCallback =
base::Callback<void(const RouteRequestResult& result)>;
+// Type of callback used for |SearchSinksAndCreateRoute()| to return the sink ID
+// of the newly-found sink. The sink ID will be the empty string if no sink was
+// found.
+using MediaSinkSearchResponseCallback =
+ base::Callback<void(const std::string& sink_id)>;
+
// Subscription object returned by calling
// |AddPresentationConnectionStateChangedCallback|. See the method comments for
// details.
@@ -159,6 +165,19 @@ class MediaRouter : public KeyedService {
// approriate to be done at construction.
virtual void OnUserGesture() = 0;
+ // Sends a SearchSinks request to the MRPM using the given criteria.
imcheng 2016/04/18 23:15:46 nit on comment: MRPM is a detail of the mojo imple
btolsch 2016/04/19 01:39:42 Done.
+ virtual void SearchSinksAndCreateRoute(
+ const MediaSource::Id& source_id,
+ const MediaSink::Id& sink_id,
+ const std::string& search_input,
+ const std::string& domain,
+ const GURL& origin,
+ content::WebContents* web_contents,
+ const std::vector<MediaRouteResponseCallback>& route_callbacks,
+ const MediaSinkSearchResponseCallback& sink_callback,
+ base::TimeDelta timeout,
+ bool off_the_record) = 0;
+
// 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

Powered by Google App Engine
This is Rietveld 408576698