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

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

Issue 2938173004: [Media Router] Add a supports_web_ui_controller attribute to MediaRoute (Closed)
Patch Set: Created 3 years, 6 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 '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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return new mediaRouterMojom.MediaRoute({ 78 return new mediaRouterMojom.MediaRoute({
79 'media_route_id': route.id, 79 'media_route_id': route.id,
80 'media_source': route.mediaSource, 80 'media_source': route.mediaSource,
81 'media_sink_id': route.sinkId, 81 'media_sink_id': route.sinkId,
82 'description': route.description, 82 'description': route.description,
83 'icon_url': route.iconUrl, 83 'icon_url': route.iconUrl,
84 'is_local': route.isLocal, 84 'is_local': route.isLocal,
85 'custom_controller_path': route.customControllerPath, 85 'custom_controller_path': route.customControllerPath,
86 // Begin newly added properties, followed by the milestone they were 86 // Begin newly added properties, followed by the milestone they were
87 // added. The guard should be safe to remove N+2 milestones later. 87 // added. The guard should be safe to remove N+2 milestones later.
88 'for_display': route.forDisplay, // M47 88 'for_display': route.forDisplay, // M47
89 'is_incognito': !!route.offTheRecord, // M50 89 'is_incognito': !!route.offTheRecord, // M50
90 'is_offscreen_presentation': !!route.isOffscreenPresentation // M56 90 'is_offscreen_presentation': !!route.isOffscreenPresentation, // M56
91 'supports_web_ui_controller': !!route.supportsWebUiController // M61
91 }); 92 });
92 } 93 }
93 94
94 /** 95 /**
95 * Converts a route message to a RouteMessage Mojo object. 96 * Converts a route message to a RouteMessage Mojo object.
96 * @param {!RouteMessage} message 97 * @param {!RouteMessage} message
97 * @return {!mediaRouterMojom.RouteMessage} A Mojo RouteMessage object. 98 * @return {!mediaRouterMojom.RouteMessage} A Mojo RouteMessage object.
98 */ 99 */
99 function messageToMojo_(message) { 100 function messageToMojo_(message) {
100 if ("string" == typeof message.message) { 101 if ("string" == typeof message.message) {
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 return this.handlers_ 925 return this.handlers_
925 .createMediaRouteController(routeId, controllerRequest, observer) 926 .createMediaRouteController(routeId, controllerRequest, observer)
926 .then(() => ({success: true}), e => ({success: false})); 927 .then(() => ({success: true}), e => ({success: false}));
927 }; 928 };
928 929
929 mediaRouter = new MediaRouter(new mediaRouterMojom.MediaRouterPtr( 930 mediaRouter = new MediaRouter(new mediaRouterMojom.MediaRouterPtr(
930 frameInterfaces.getInterface(mediaRouterMojom.MediaRouter.name))); 931 frameInterfaces.getInterface(mediaRouterMojom.MediaRouter.name)));
931 932
932 return mediaRouter; 933 return mediaRouter;
933 }); 934 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698