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/frame_service_registry', | 10 'content/public/renderer/frame_service_registry', |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 'media_route_id': route.id, | 71 'media_route_id': route.id, |
72 'media_source': route.mediaSource, | 72 'media_source': route.mediaSource, |
73 'media_sink_id': route.sinkId, | 73 'media_sink_id': route.sinkId, |
74 'description': route.description, | 74 'description': route.description, |
75 'icon_url': route.iconUrl, | 75 'icon_url': route.iconUrl, |
76 'is_local': route.isLocal, | 76 'is_local': route.isLocal, |
77 'custom_controller_path': route.customControllerPath, | 77 'custom_controller_path': route.customControllerPath, |
78 // Begin newly added properties, followed by the milestone they were | 78 // Begin newly added properties, followed by the milestone they were |
79 // added. The guard should be safe to remove N+2 milestones later. | 79 // added. The guard should be safe to remove N+2 milestones later. |
80 'for_display': route.forDisplay, // M47 | 80 'for_display': route.forDisplay, // M47 |
81 'off_the_record': !!route.offTheRecord // M50 | 81 'off_the_record': !!route.offTheRecord, // M50 |
| 82 'is_offscreen_presentation': route.isOffscreenPresentation || false // M53 |
82 }); | 83 }); |
83 } | 84 } |
84 | 85 |
85 /** | 86 /** |
86 * Converts a route message to a RouteMessage Mojo object. | 87 * Converts a route message to a RouteMessage Mojo object. |
87 * @param {!RouteMessage} message | 88 * @param {!RouteMessage} message |
88 * @return {!mediaRouterMojom.RouteMessage} A Mojo RouteMessage object. | 89 * @return {!mediaRouterMojom.RouteMessage} A Mojo RouteMessage object. |
89 */ | 90 */ |
90 function messageToMojo_(message) { | 91 function messageToMojo_(message) { |
91 if ("string" == typeof message.message) { | 92 if ("string" == typeof message.message) { |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 }; | 811 }; |
811 | 812 |
812 mediaRouter = new MediaRouter(connector.bindHandleToProxy( | 813 mediaRouter = new MediaRouter(connector.bindHandleToProxy( |
813 serviceProvider.connectToService( | 814 serviceProvider.connectToService( |
814 mediaRouterMojom.MediaRouter.name), | 815 mediaRouterMojom.MediaRouter.name), |
815 mediaRouterMojom.MediaRouter)); | 816 mediaRouterMojom.MediaRouter)); |
816 | 817 |
817 return mediaRouter; | 818 return mediaRouter; |
818 }); | 819 }); |
819 | 820 |
OLD | NEW |