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

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

Issue 1821823002: [Media Router] Conditionally enable mDNS on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Semicolon for Windows code 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 739
734 /** 740 /**
735 * Requests that the provider manager stop sending information about active 741 * Requests that the provider manager stop sending information about active
736 * media routes to the Media Router. 742 * media routes to the Media Router.
737 * @param {!string} sourceUrn 743 * @param {!string} sourceUrn
738 */ 744 */
739 MediaRouteProvider.prototype.stopObservingMediaRoutes = function(sourceUrn) { 745 MediaRouteProvider.prototype.stopObservingMediaRoutes = function(sourceUrn) {
740 this.handlers_.stopObservingMediaRoutes(sourceUrn); 746 this.handlers_.stopObservingMediaRoutes(sourceUrn);
741 }; 747 };
742 748
749 /**
750 * Enables mDNS device discovery.
751 */
752 MediaRouteProvider.prototype.enableMdnsDiscovery = function() {
753 this.handlers_.enableMdnsDiscovery();
754 };
755
743 mediaRouter = new MediaRouter(connector.bindHandleToProxy( 756 mediaRouter = new MediaRouter(connector.bindHandleToProxy(
744 serviceProvider.connectToService( 757 serviceProvider.connectToService(
745 mediaRouterMojom.MediaRouter.name), 758 mediaRouterMojom.MediaRouter.name),
746 mediaRouterMojom.MediaRouter)); 759 mediaRouterMojom.MediaRouter));
747 760
748 return mediaRouter; 761 return mediaRouter;
749 }); 762 });
750 763
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