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

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

Issue 1475843002: [MR] Add description field to MediaSink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/test/data/webui/media_router/media_router_container_tests.js ('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 11 matching lines...) Expand all
22 'use strict'; 22 'use strict';
23 23
24 /** 24 /**
25 * Converts a media sink to a MediaSink Mojo object. 25 * Converts a media sink to a MediaSink Mojo object.
26 * @param {!MediaSink} sink A media sink. 26 * @param {!MediaSink} sink A media sink.
27 * @return {!mediaRouterMojom.MediaSink} A Mojo MediaSink object. 27 * @return {!mediaRouterMojom.MediaSink} A Mojo MediaSink object.
28 */ 28 */
29 function sinkToMojo_(sink) { 29 function sinkToMojo_(sink) {
30 return new mediaRouterMojom.MediaSink({ 30 return new mediaRouterMojom.MediaSink({
31 'name': sink.friendlyName, 31 'name': sink.friendlyName,
32 'description': sink.description,
32 'sink_id': sink.id, 33 'sink_id': sink.id,
33 'icon_type': sinkIconTypeToMojo(sink.iconType), 34 'icon_type': sinkIconTypeToMojo(sink.iconType),
34 }); 35 });
35 } 36 }
36 37
37 /** 38 /**
38 * Converts a media sink's icon type to a MediaSink.IconType Mojo object. 39 * Converts a media sink's icon type to a MediaSink.IconType Mojo object.
39 * @param {!MediaSink.IconType} type A media sink's icon type. 40 * @param {!MediaSink.IconType} type A media sink's icon type.
40 * @return {!mediaRouterMojom.MediaSink.IconType} A Mojo MediaSink.IconType 41 * @return {!mediaRouterMojom.MediaSink.IconType} A Mojo MediaSink.IconType
41 * object. 42 * object.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 }; 592 };
592 593
593 mediaRouter = new MediaRouter(connector.bindHandleToProxy( 594 mediaRouter = new MediaRouter(connector.bindHandleToProxy(
594 serviceProvider.connectToService( 595 serviceProvider.connectToService(
595 mediaRouterMojom.MediaRouter.name), 596 mediaRouterMojom.MediaRouter.name),
596 mediaRouterMojom.MediaRouter)); 597 mediaRouterMojom.MediaRouter));
597 598
598 return mediaRouter; 599 return mediaRouter;
599 }); 600 });
600 601
OLDNEW
« no previous file with comments | « chrome/test/data/webui/media_router/media_router_container_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698