| OLD | NEW |
| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 console.error(nextHandler + ' handler not registered.'); | 449 console.error(nextHandler + ' handler not registered.'); |
| 450 } | 450 } |
| 451 }); | 451 }); |
| 452 } | 452 } |
| 453 | 453 |
| 454 /** | 454 /** |
| 455 * Starts querying for sinks capable of displaying the media source | 455 * Starts querying for sinks capable of displaying the media source |
| 456 * designated by |sourceUrn|. Results are returned by calling | 456 * designated by |sourceUrn|. Results are returned by calling |
| 457 * OnSinksReceived. | 457 * OnSinksReceived. |
| 458 * @param {!string} sourceUrn | 458 * @param {!string} sourceUrn |
| 459 * @param {!string} origin |
| 459 */ | 460 */ |
| 460 MediaRouteProvider.prototype.startObservingMediaSinks = | 461 MediaRouteProvider.prototype.startObservingMediaSinks = |
| 461 function(sourceUrn) { | 462 function(sourceUrn, origin) { |
| 462 this.handlers_.startObservingMediaSinks(sourceUrn); | 463 this.handlers_.startObservingMediaSinks(sourceUrn, origin); |
| 463 }; | 464 }; |
| 464 | 465 |
| 465 /** | 466 /** |
| 466 * Stops querying for sinks capable of displaying |sourceUrn|. | 467 * Stops querying for sinks capable of displaying |sourceUrn|. |
| 467 * @param {!string} sourceUrn | 468 * @param {!string} sourceUrn |
| 468 */ | 469 */ |
| 469 MediaRouteProvider.prototype.stopObservingMediaSinks = | 470 MediaRouteProvider.prototype.stopObservingMediaSinks = |
| 470 function(sourceUrn) { | 471 function(sourceUrn) { |
| 471 this.handlers_.stopObservingMediaSinks(sourceUrn); | 472 this.handlers_.stopObservingMediaSinks(sourceUrn); |
| 472 }; | 473 }; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 }; | 643 }; |
| 643 | 644 |
| 644 mediaRouter = new MediaRouter(connector.bindHandleToProxy( | 645 mediaRouter = new MediaRouter(connector.bindHandleToProxy( |
| 645 serviceProvider.connectToService( | 646 serviceProvider.connectToService( |
| 646 mediaRouterMojom.MediaRouter.name), | 647 mediaRouterMojom.MediaRouter.name), |
| 647 mediaRouterMojom.MediaRouter)); | 648 mediaRouterMojom.MediaRouter)); |
| 648 | 649 |
| 649 return mediaRouter; | 650 return mediaRouter; |
| 650 }); | 651 }); |
| 651 | 652 |
| OLD | NEW |