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

Side by Side Diff: chrome/browser/resources/media_router/media_router_ui_interface.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 // API invoked by the browser MediaRouterWebUIMessageHandler to communicate 5 // API invoked by the browser MediaRouterWebUIMessageHandler to communicate
6 // with this UI. 6 // with this UI.
7 cr.define('media_router.ui', function() { 7 cr.define('media_router.ui', function() {
8 'use strict'; 8 'use strict';
9 9
10 // The media-router-container element. 10 // The media-router-container element.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 * sinksAndIdentity - list of sinks to be displayed and user identity. 113 * sinksAndIdentity - list of sinks to be displayed and user identity.
114 * useWebUiRouteControls - whether new WebUI route controls should be used. 114 * useWebUiRouteControls - whether new WebUI route controls should be used.
115 * routes - list of routes that are associated with the sinks. 115 * routes - list of routes that are associated with the sinks.
116 * castModes - list of available cast modes. 116 * castModes - list of available cast modes.
117 * useTabMirroring - whether the cast mode should be set to TAB_MIRROR. 117 * useTabMirroring - whether the cast mode should be set to TAB_MIRROR.
118 */ 118 */
119 function setInitialData(data) { 119 function setInitialData(data) {
120 container.deviceMissingUrl = data['deviceMissingUrl']; 120 container.deviceMissingUrl = data['deviceMissingUrl'];
121 container.castModeList = data['castModes']; 121 container.castModeList = data['castModes'];
122 this.setSinkListAndIdentity(data['sinksAndIdentity']); 122 this.setSinkListAndIdentity(data['sinksAndIdentity']);
123 container.useWebUiRouteControls = !!data['useWebUiRouteControls']; 123 container.webUiRouteControlsAvailable =
124 !!data['webUiRouteControlsAvailable'];
124 container.routeList = data['routes']; 125 container.routeList = data['routes'];
125 container.maybeShowRouteDetailsOnOpen(); 126 container.maybeShowRouteDetailsOnOpen();
126 if (data['useTabMirroring']) 127 if (data['useTabMirroring'])
127 container.selectCastMode(media_router.CastModeType.TAB_MIRROR); 128 container.selectCastMode(media_router.CastModeType.TAB_MIRROR);
128 media_router.browserApi.onInitialDataReceived(); 129 media_router.browserApi.onInitialDataReceived();
129 } 130 }
130 131
131 /** 132 /**
132 * Sets current issue to |issue|, or clears the current issue if |issue| is 133 * Sets current issue to |issue|, or clears the current issue if |issue| is
133 * null. 134 * null.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 setInitialData: setInitialData, 213 setInitialData: setInitialData,
213 setIssue: setIssue, 214 setIssue: setIssue,
214 setRouteControls: setRouteControls, 215 setRouteControls: setRouteControls,
215 setRouteList: setRouteList, 216 setRouteList: setRouteList,
216 setSinkListAndIdentity: setSinkListAndIdentity, 217 setSinkListAndIdentity: setSinkListAndIdentity,
217 updateMaxHeight: updateMaxHeight, 218 updateMaxHeight: updateMaxHeight,
218 updateRouteStatus: updateRouteStatus, 219 updateRouteStatus: updateRouteStatus,
219 userSelectedLocalMediaFile: userSelectedLocalMediaFile, 220 userSelectedLocalMediaFile: userSelectedLocalMediaFile,
220 }; 221 };
221 }); 222 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698