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_interfaces', | 10 'content/public/renderer/frame_interfaces', |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 'media_route_id': route.id, | 73 'media_route_id': route.id, |
74 'media_source': route.mediaSource, | 74 'media_source': route.mediaSource, |
75 'media_sink_id': route.sinkId, | 75 'media_sink_id': route.sinkId, |
76 'description': route.description, | 76 'description': route.description, |
77 'icon_url': route.iconUrl, | 77 'icon_url': route.iconUrl, |
78 'is_local': route.isLocal, | 78 'is_local': route.isLocal, |
79 'custom_controller_path': route.customControllerPath, | 79 'custom_controller_path': route.customControllerPath, |
80 // Begin newly added properties, followed by the milestone they were | 80 // Begin newly added properties, followed by the milestone they were |
81 // added. The guard should be safe to remove N+2 milestones later. | 81 // added. The guard should be safe to remove N+2 milestones later. |
82 'for_display': route.forDisplay, // M47 | 82 'for_display': route.forDisplay, // M47 |
83 'incognito': !!route.offTheRecord // M50 | 83 'incognito': !!route.offTheRecord, // M50 |
| 84 'is_offscreen_presentation': !!route.isOffscreenPresentation // M56 |
84 }); | 85 }); |
85 } | 86 } |
86 | 87 |
87 /** | 88 /** |
88 * Converts a route message to a RouteMessage Mojo object. | 89 * Converts a route message to a RouteMessage Mojo object. |
89 * @param {!RouteMessage} message | 90 * @param {!RouteMessage} message |
90 * @return {!mediaRouterMojom.RouteMessage} A Mojo RouteMessage object. | 91 * @return {!mediaRouterMojom.RouteMessage} A Mojo RouteMessage object. |
91 */ | 92 */ |
92 function messageToMojo_(message) { | 93 function messageToMojo_(message) { |
93 if ("string" == typeof message.message) { | 94 if ("string" == typeof message.message) { |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 'sink_id': this.handlers_.searchSinks(sinkId, sourceUrn, searchCriteria) | 876 'sink_id': this.handlers_.searchSinks(sinkId, sourceUrn, searchCriteria) |
876 }); | 877 }); |
877 }; | 878 }; |
878 | 879 |
879 mediaRouter = new MediaRouter(connector.bindHandleToProxy( | 880 mediaRouter = new MediaRouter(connector.bindHandleToProxy( |
880 frameInterfaces.getInterface(mediaRouterMojom.MediaRouter.name), | 881 frameInterfaces.getInterface(mediaRouterMojom.MediaRouter.name), |
881 mediaRouterMojom.MediaRouter)); | 882 mediaRouterMojom.MediaRouter)); |
882 | 883 |
883 return mediaRouter; | 884 return mediaRouter; |
884 }); | 885 }); |
OLD | NEW |