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

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

Issue 1784533004: [Media Router] Add origins to sink query results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 */ 258 */
259 MediaRouter.prototype.getKeepAlive = function() { 259 MediaRouter.prototype.getKeepAlive = function() {
260 return this.keepAlive_ != null; 260 return this.keepAlive_ != null;
261 }; 261 };
262 262
263 /** 263 /**
264 * Called by the provider manager when a sink list for a given source is 264 * Called by the provider manager when a sink list for a given source is
265 * updated. 265 * updated.
266 * @param {!string} sourceUrn 266 * @param {!string} sourceUrn
267 * @param {!Array<!MediaSink>} sinks 267 * @param {!Array<!MediaSink>} sinks
268 * @param {Array<string>=} opt_origins
268 */ 269 */
269 MediaRouter.prototype.onSinksReceived = function(sourceUrn, sinks) { 270 MediaRouter.prototype.onSinksReceived = function(sourceUrn, sinks,
270 this.service_.onSinksReceived(sourceUrn, sinks.map(sinkToMojo_)); 271 opt_origins) {
272 this.service_.onSinksReceived(sourceUrn, sinks.map(sinkToMojo_),
mark a. foltz 2016/03/11 01:20:23 Add a TODO to make |origins| mandatory in a future
imcheng 2016/03/14 21:30:20 Done.
273 opt_origins || []);
271 }; 274 };
272 275
273 /** 276 /**
274 * Called by the provider manager to keep the extension from suspending 277 * Called by the provider manager to keep the extension from suspending
275 * if it enters a state where suspension is undesirable (e.g. there is an 278 * if it enters a state where suspension is undesirable (e.g. there is an
276 * active MediaRoute.) 279 * active MediaRoute.)
277 * If keepAlive is true, the extension is kept alive. 280 * If keepAlive is true, the extension is kept alive.
278 * If keepAlive is false, the extension is allowed to suspend. 281 * If keepAlive is false, the extension is allowed to suspend.
279 * @param {boolean} keepAlive 282 * @param {boolean} keepAlive
280 */ 283 */
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 }; 737 };
735 738
736 mediaRouter = new MediaRouter(connector.bindHandleToProxy( 739 mediaRouter = new MediaRouter(connector.bindHandleToProxy(
737 serviceProvider.connectToService( 740 serviceProvider.connectToService(
738 mediaRouterMojom.MediaRouter.name), 741 mediaRouterMojom.MediaRouter.name),
739 mediaRouterMojom.MediaRouter)); 742 mediaRouterMojom.MediaRouter));
740 743
741 return mediaRouter; 744 return mediaRouter;
742 }); 745 });
743 746
OLDNEW
« chrome/browser/ui/webui/media_router/media_router_ui.cc ('K') | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698