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

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

Issue 2142613002: [Media Router WebUI] Move replace route responsibility to extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename event name in route_details_tests.js Created 4 years, 4 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 * @param {string} issueId 196 * @param {string} issueId
197 * @param {number} actionType Type of action that the user clicked. 197 * @param {number} actionType Type of action that the user clicked.
198 * @param {?number} helpPageId The numeric help center ID. 198 * @param {?number} helpPageId The numeric help center ID.
199 */ 199 */
200 function actOnIssue(issueId, actionType, helpPageId) { 200 function actOnIssue(issueId, actionType, helpPageId) {
201 chrome.send('actOnIssue', [{issueId: issueId, actionType: actionType, 201 chrome.send('actOnIssue', [{issueId: issueId, actionType: actionType,
202 helpPageId: helpPageId}]); 202 helpPageId: helpPageId}]);
203 } 203 }
204 204
205 /** 205 /**
206 * Modifies |route| by changing its source to the one identified by
207 * |selectedCastMode|.
208 *
209 * @param {!media_router.Route} route The route being modified.
210 * @param {number} selectedCastMode The value of the cast mode the user
211 * selected.
212 */
213 function changeRouteSource(route, selectedCastMode) {
214 chrome.send('requestRoute',
215 [{sinkId: route.sinkId, selectedCastMode: selectedCastMode}]);
216 }
217
218 /**
206 * Closes the dialog. 219 * Closes the dialog.
207 * 220 *
208 * @param {boolean} pressEscToClose Whether the user pressed ESC to close the 221 * @param {boolean} pressEscToClose Whether the user pressed ESC to close the
209 * dialog. 222 * dialog.
210 */ 223 */
211 function closeDialog(pressEscToClose) { 224 function closeDialog(pressEscToClose) {
212 chrome.send('closeDialog', [pressEscToClose]); 225 chrome.send('closeDialog', [pressEscToClose]);
213 } 226 }
214 227
215 /** 228 /**
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 chrome.send('searchSinksAndCreateRoute', 393 chrome.send('searchSinksAndCreateRoute',
381 [{sinkId: sinkId, 394 [{sinkId: sinkId,
382 searchCriteria: searchCriteria, 395 searchCriteria: searchCriteria,
383 domain: domain, 396 domain: domain,
384 selectedCastMode: selectedCastMode}]); 397 selectedCastMode: selectedCastMode}]);
385 } 398 }
386 399
387 return { 400 return {
388 acknowledgeFirstRunFlow: acknowledgeFirstRunFlow, 401 acknowledgeFirstRunFlow: acknowledgeFirstRunFlow,
389 actOnIssue: actOnIssue, 402 actOnIssue: actOnIssue,
403 changeRouteSource: changeRouteSource,
390 closeDialog: closeDialog, 404 closeDialog: closeDialog,
391 closeRoute: closeRoute, 405 closeRoute: closeRoute,
392 joinRoute: joinRoute, 406 joinRoute: joinRoute,
393 onInitialDataReceived: onInitialDataReceived, 407 onInitialDataReceived: onInitialDataReceived,
394 reportBlur: reportBlur, 408 reportBlur: reportBlur,
395 reportClickedSinkIndex: reportClickedSinkIndex, 409 reportClickedSinkIndex: reportClickedSinkIndex,
396 reportFilter: reportFilter, 410 reportFilter: reportFilter,
397 reportInitialAction: reportInitialAction, 411 reportInitialAction: reportInitialAction,
398 reportInitialState: reportInitialState, 412 reportInitialState: reportInitialState,
399 reportNavigateToView: reportNavigateToView, 413 reportNavigateToView: reportNavigateToView,
400 reportRouteCreation: reportRouteCreation, 414 reportRouteCreation: reportRouteCreation,
401 reportRouteCreationOutcome: reportRouteCreationOutcome, 415 reportRouteCreationOutcome: reportRouteCreationOutcome,
402 reportSelectedCastMode: reportSelectedCastMode, 416 reportSelectedCastMode: reportSelectedCastMode,
403 reportSinkCount: reportSinkCount, 417 reportSinkCount: reportSinkCount,
404 reportTimeToClickSink: reportTimeToClickSink, 418 reportTimeToClickSink: reportTimeToClickSink,
405 reportTimeToInitialActionClose: reportTimeToInitialActionClose, 419 reportTimeToInitialActionClose: reportTimeToInitialActionClose,
406 requestInitialData: requestInitialData, 420 requestInitialData: requestInitialData,
407 requestRoute: requestRoute, 421 requestRoute: requestRoute,
408 searchSinksAndCreateRoute: searchSinksAndCreateRoute, 422 searchSinksAndCreateRoute: searchSinksAndCreateRoute,
409 }; 423 };
410 }); 424 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/media_router/media_router.js ('k') | chrome/test/data/webui/media_router/route_details_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698