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

Side by Side Diff: chrome/browser/resources/media_router/media_router_ui_interface.js

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fixes 2 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
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 /** 137 /**
138 * Closes the given route. 138 * Closes the given route.
139 * 139 *
140 * @param {!media_router.Route} route 140 * @param {!media_router.Route} route
141 */ 141 */
142 function closeRoute(route) { 142 function closeRoute(route) {
143 chrome.send('closeRoute', [{routeId: route.id}]); 143 chrome.send('closeRoute', [{routeId: route.id}]);
144 } 144 }
145 145
146 /** 146 /**
147 * Joins the given route.
148 *
149 * @param {!media_router.Route} route
150 */
151 function joinRoute(route) {
152 chrome.send('joinRoute', [{sinkId: route.sinkId, routeId: route.id}]);
153 }
154
155 /**
147 * Reports the current number of sinks. 156 * Reports the current number of sinks.
148 * 157 *
149 * @param {number} sinkCount 158 * @param {number} sinkCount
150 */ 159 */
151 function reportSinkCount(sinkCount) { 160 function reportSinkCount(sinkCount) {
152 chrome.send('reportSinkCount', [sinkCount]); 161 chrome.send('reportSinkCount', [sinkCount]);
153 } 162 }
154 163
155 /** 164 /**
156 * Requests data to initialize the WebUI with. 165 * Requests data to initialize the WebUI with.
(...skipping 12 matching lines...) Expand all
169 */ 178 */
170 function requestRoute(sinkId, selectedCastMode) { 179 function requestRoute(sinkId, selectedCastMode) {
171 chrome.send('requestRoute', 180 chrome.send('requestRoute',
172 [{sinkId: sinkId, selectedCastMode: selectedCastMode}]); 181 [{sinkId: sinkId, selectedCastMode: selectedCastMode}]);
173 } 182 }
174 183
175 return { 184 return {
176 actOnIssue: actOnIssue, 185 actOnIssue: actOnIssue,
177 closeDialog: closeDialog, 186 closeDialog: closeDialog,
178 closeRoute: closeRoute, 187 closeRoute: closeRoute,
188 joinRoute: joinRoute,
179 reportSinkCount: reportSinkCount, 189 reportSinkCount: reportSinkCount,
180 requestInitialData: requestInitialData, 190 requestInitialData: requestInitialData,
181 requestRoute: requestRoute, 191 requestRoute: requestRoute,
182 }; 192 };
183 }); 193 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698