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

Side by Side Diff: extensions/renderer/resources/media_router_bindings.js

Issue 1846673002: [Media Router] Conditionally enable mDNS on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Patch-up newly-added test. 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var mediaRouter; 5 var mediaRouter;
6 6
7 define('media_router_bindings', [ 7 define('media_router_bindings', [
8 'mojo/public/js/bindings', 8 'mojo/public/js/bindings',
9 'mojo/public/js/core', 9 'mojo/public/js/core',
10 'content/public/renderer/service_provider', 10 'content/public/renderer/service_provider',
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 /** 467 /**
468 * @type {function()} 468 * @type {function()}
469 */ 469 */
470 this.stopObservingMediaRoutes = null; 470 this.stopObservingMediaRoutes = null;
471 471
472 /** 472 /**
473 * @type {function()} 473 * @type {function()}
474 */ 474 */
475 this.connectRouteByRouteId = null; 475 this.connectRouteByRouteId = null;
476
477 /**
478 * @type {function()}
479 */
480 this.enableMdnsDiscovery = null;
476 }; 481 };
477 482
478 /** 483 /**
479 * Routes calls from Media Router to the provider manager extension. 484 * Routes calls from Media Router to the provider manager extension.
480 * Registered with the MediaRouter stub. 485 * Registered with the MediaRouter stub.
481 * @param {!MediaRouter} MediaRouter proxy to call into the 486 * @param {!MediaRouter} MediaRouter proxy to call into the
482 * Media Router mojo interface. 487 * Media Router mojo interface.
483 * @constructor 488 * @constructor
484 */ 489 */
485 function MediaRouteProvider(mediaRouter) { 490 function MediaRouteProvider(mediaRouter) {
(...skipping 27 matching lines...) Expand all
513 'sendRouteMessage', 518 'sendRouteMessage',
514 'sendRouteBinaryMessage', 519 'sendRouteBinaryMessage',
515 'listenForRouteMessages', 520 'listenForRouteMessages',
516 'stopListeningForRouteMessages', 521 'stopListeningForRouteMessages',
517 'detachRoute', 522 'detachRoute',
518 'terminateRoute', 523 'terminateRoute',
519 'joinRoute', 524 'joinRoute',
520 'createRoute', 525 'createRoute',
521 'stopObservingMediaSinks', 526 'stopObservingMediaSinks',
522 'startObservingMediaRoutes', 527 'startObservingMediaRoutes',
523 'connectRouteByRouteId' 528 'connectRouteByRouteId',
529 'enableMdnsDiscovery',
524 ]; 530 ];
525 requiredHandlers.forEach(function(nextHandler) { 531 requiredHandlers.forEach(function(nextHandler) {
526 if (handlers[nextHandler] === undefined) { 532 if (handlers[nextHandler] === undefined) {
527 console.error(nextHandler + ' handler not registered.'); 533 console.error(nextHandler + ' handler not registered.');
528 } 534 }
529 }); 535 });
530 } 536 }
531 537
532 /** 538 /**
533 * Starts querying for sinks capable of displaying the media source 539 * Starts querying for sinks capable of displaying the media source
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 736
731 /** 737 /**
732 * Requests that the provider manager stop sending information about active 738 * Requests that the provider manager stop sending information about active
733 * media routes to the Media Router. 739 * media routes to the Media Router.
734 * @param {!string} sourceUrn 740 * @param {!string} sourceUrn
735 */ 741 */
736 MediaRouteProvider.prototype.stopObservingMediaRoutes = function(sourceUrn) { 742 MediaRouteProvider.prototype.stopObservingMediaRoutes = function(sourceUrn) {
737 this.handlers_.stopObservingMediaRoutes(sourceUrn); 743 this.handlers_.stopObservingMediaRoutes(sourceUrn);
738 }; 744 };
739 745
746 /**
747 * Enables mDNS device discovery.
748 */
749 MediaRouteProvider.prototype.enableMdnsDiscovery = function() {
750 this.handlers_.enableMdnsDiscovery();
751 };
752
740 mediaRouter = new MediaRouter(connector.bindHandleToProxy( 753 mediaRouter = new MediaRouter(connector.bindHandleToProxy(
741 serviceProvider.connectToService( 754 serviceProvider.connectToService(
742 mediaRouterMojom.MediaRouter.name), 755 mediaRouterMojom.MediaRouter.name),
743 mediaRouterMojom.MediaRouter)); 756 mediaRouterMojom.MediaRouter));
744 757
745 return mediaRouter; 758 return mediaRouter;
746 }); 759 });
747 760
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698