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

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

Issue 2873893003: [Media Router] Add features to control browser side discovery (Closed)
Patch Set: resolve code review comments from Mark Created 3 years, 7 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/common/media_router/mojo/media_router.mojom ('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 'chrome/common/media_router/mojo/media_controller.mojom', 8 'chrome/common/media_router/mojo/media_controller.mojom',
9 'chrome/common/media_router/mojo/media_router.mojom', 9 'chrome/common/media_router/mojo/media_router.mojom',
10 'chrome/common/media_router/mojo/media_status.mojom', 10 'chrome/common/media_router/mojo/media_status.mojom',
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 MediaStatusObserverPtr: mediaStatusMojom.MediaStatusObserverPtr, 287 MediaStatusObserverPtr: mediaStatusMojom.MediaStatusObserverPtr,
288 Sink: mediaRouterMojom.MediaSink, 288 Sink: mediaRouterMojom.MediaSink,
289 SinkExtraData: mediaRouterMojom.MediaSinkExtraData, 289 SinkExtraData: mediaRouterMojom.MediaSinkExtraData,
290 TimeDelta: timeMojom.TimeDelta, 290 TimeDelta: timeMojom.TimeDelta,
291 Url: urlMojom.Url, 291 Url: urlMojom.Url,
292 }; 292 };
293 }; 293 };
294 294
295 /** 295 /**
296 * Registers the Media Router Provider Manager with the Media Router. 296 * Registers the Media Router Provider Manager with the Media Router.
297 * @return {!Promise<string>} Instance ID for the Media Router. 297 * @return {!Promise<Object>} Instance ID and config for the Media Router.
298 */ 298 */
299 MediaRouter.prototype.start = function() { 299 MediaRouter.prototype.start = function() {
300 return this.service_.registerMediaRouteProvider( 300 return this.service_.registerMediaRouteProvider(
301 this.mediaRouteProviderBinding_.createInterfacePtrAndBind()).then( 301 this.mediaRouteProviderBinding_.createInterfacePtrAndBind());
302 function(result) {
303 return result.instance_id;
304 }.bind(this));
305 } 302 }
306 303
307 /** 304 /**
308 * Sets the service delegate methods. 305 * Sets the service delegate methods.
309 * @param {Object} handlers 306 * @param {Object} handlers
310 */ 307 */
311 MediaRouter.prototype.setHandlers = function(handlers) { 308 MediaRouter.prototype.setHandlers = function(handlers) {
312 this.mrpm_.setHandlers(handlers); 309 this.mrpm_.setHandlers(handlers);
313 } 310 }
314 311
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 return this.handlers_ 931 return this.handlers_
935 .createMediaRouteController(routeId, controllerRequest, observer) 932 .createMediaRouteController(routeId, controllerRequest, observer)
936 .then(() => ({success: true}), e => ({success: false})); 933 .then(() => ({success: true}), e => ({success: false}));
937 }; 934 };
938 935
939 mediaRouter = new MediaRouter(new mediaRouterMojom.MediaRouterPtr( 936 mediaRouter = new MediaRouter(new mediaRouterMojom.MediaRouterPtr(
940 frameInterfaces.getInterface(mediaRouterMojom.MediaRouter.name))); 937 frameInterfaces.getInterface(mediaRouterMojom.MediaRouter.name)));
941 938
942 return mediaRouter; 939 return mediaRouter;
943 }); 940 });
OLDNEW
« no previous file with comments | « chrome/common/media_router/mojo/media_router.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698