| Index: extensions/renderer/resources/media_router_bindings.js
|
| diff --git a/extensions/renderer/resources/media_router_bindings.js b/extensions/renderer/resources/media_router_bindings.js
|
| index b6252c50e999fe49cbc08973532b30b1db95939b..cf0410c31e81932d45bdf7259a22ca4567343844 100644
|
| --- a/extensions/renderer/resources/media_router_bindings.js
|
| +++ b/extensions/renderer/resources/media_router_bindings.js
|
| @@ -271,6 +271,16 @@ define('media_router_bindings', [
|
| };
|
|
|
| /**
|
| + * Called by the provider manager when all sinks matching |sinkId| have been
|
| + * found.
|
| + * @param {!string} sinkId
|
| + * @param {!Array<!MediaSink>} sinks
|
| + */
|
| + MediaRouter.prototype.onSearchSinksReceived = function(sinkId, sinks) {
|
| + this.service_.onSearchSinksReceived(sinkId, sinks.map(sinkToMojo_));
|
| + };
|
| +
|
| + /**
|
| * Called by the provider manager to keep the extension from suspending
|
| * if it enters a state where suspension is undesirable (e.g. there is an
|
| * active MediaRoute.)
|
| @@ -469,6 +479,11 @@ define('media_router_bindings', [
|
| * @type {function()}
|
| */
|
| this.connectRouteByRouteId = null;
|
| +
|
| + /**
|
| + * @type {function(string, string)}
|
| + */
|
| + this.searchProviders = null;
|
| };
|
|
|
| /**
|
| @@ -516,7 +531,8 @@ define('media_router_bindings', [
|
| 'createRoute',
|
| 'stopObservingMediaSinks',
|
| 'startObservingMediaRoutes',
|
| - 'connectRouteByRouteId'
|
| + 'connectRouteByRouteId',
|
| + 'searchProviders',
|
| ];
|
| requiredHandlers.forEach(function(nextHandler) {
|
| if (handlers[nextHandler] === undefined) {
|
| @@ -733,6 +749,16 @@ define('media_router_bindings', [
|
| this.handlers_.stopObservingMediaRoutes(sourceUrn);
|
| };
|
|
|
| + /**
|
| + * Requests that the provider manager search its providers for a sink with id
|
| + * |sinkId| that is compatible with |sourceUrn|.
|
| + * @param {string} sourceUrn Media source to be used with the sink.
|
| + * @param {string} sinkId Sink ID to search for.
|
| + */
|
| + MediaRouteProvider.prototype.searchProviders = function(sourceUrn, sinkId) {
|
| + this.handlers_.searchProviders(sourceUrn, sinkId);
|
| + };
|
| +
|
| mediaRouter = new MediaRouter(connector.bindHandleToProxy(
|
| serviceProvider.connectToService(
|
| mediaRouterMojom.MediaRouter.name),
|
|
|