| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 this UI to communicate with the browser WebUI message handler. | 5 // API invoked by this UI to communicate with the browser WebUI message handler. |
| 6 cr.define('media_router.browserApi', function() { | 6 cr.define('media_router.browserApi', function() { |
| 7 'use strict'; | 7 'use strict'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Indicates that the user has acknowledged the first run flow. | 10 * Indicates that the user has acknowledged the first run flow. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 * Reports the time, in ms, it took for the user to close the dialog without | 208 * Reports the time, in ms, it took for the user to close the dialog without |
| 209 * taking any other action. | 209 * taking any other action. |
| 210 * | 210 * |
| 211 * @param {number} timeMs | 211 * @param {number} timeMs |
| 212 */ | 212 */ |
| 213 function reportTimeToInitialActionClose(timeMs) { | 213 function reportTimeToInitialActionClose(timeMs) { |
| 214 chrome.send('reportTimeToInitialActionClose', [timeMs]); | 214 chrome.send('reportTimeToInitialActionClose', [timeMs]); |
| 215 } | 215 } |
| 216 | 216 |
| 217 /** | 217 /** |
| 218 * Reports the time, in ms, it took the WebUI route controller to load media |
| 219 * status info. |
| 220 * |
| 221 * @param {number} timeMs |
| 222 */ |
| 223 function reportWebUIRouteControllerLoaded(timeMs) { |
| 224 chrome.send('reportWebUIRouteControllerLoaded', [timeMs]); |
| 225 } |
| 226 |
| 227 /** |
| 218 * Requests data to initialize the WebUI with. | 228 * Requests data to initialize the WebUI with. |
| 219 * The data will be returned via media_router.ui.setInitialData. | 229 * The data will be returned via media_router.ui.setInitialData. |
| 220 */ | 230 */ |
| 221 function requestInitialData() { | 231 function requestInitialData() { |
| 222 chrome.send('requestInitialData'); | 232 chrome.send('requestInitialData'); |
| 223 } | 233 } |
| 224 | 234 |
| 225 /** | 235 /** |
| 226 * Requests that a media route be started with the given sink. | 236 * Requests that a media route be started with the given sink. |
| 227 * | 237 * |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 reportFilter: reportFilter, | 312 reportFilter: reportFilter, |
| 303 reportInitialAction: reportInitialAction, | 313 reportInitialAction: reportInitialAction, |
| 304 reportInitialState: reportInitialState, | 314 reportInitialState: reportInitialState, |
| 305 reportNavigateToView: reportNavigateToView, | 315 reportNavigateToView: reportNavigateToView, |
| 306 reportRouteCreation: reportRouteCreation, | 316 reportRouteCreation: reportRouteCreation, |
| 307 reportRouteCreationOutcome: reportRouteCreationOutcome, | 317 reportRouteCreationOutcome: reportRouteCreationOutcome, |
| 308 reportSelectedCastMode: reportSelectedCastMode, | 318 reportSelectedCastMode: reportSelectedCastMode, |
| 309 reportSinkCount: reportSinkCount, | 319 reportSinkCount: reportSinkCount, |
| 310 reportTimeToClickSink: reportTimeToClickSink, | 320 reportTimeToClickSink: reportTimeToClickSink, |
| 311 reportTimeToInitialActionClose: reportTimeToInitialActionClose, | 321 reportTimeToInitialActionClose: reportTimeToInitialActionClose, |
| 322 reportWebUIRouteControllerLoaded: reportWebUIRouteControllerLoaded, |
| 312 requestInitialData: requestInitialData, | 323 requestInitialData: requestInitialData, |
| 313 requestRoute: requestRoute, | 324 requestRoute: requestRoute, |
| 314 searchSinksAndCreateRoute: searchSinksAndCreateRoute, | 325 searchSinksAndCreateRoute: searchSinksAndCreateRoute, |
| 315 seekCurrentMedia: seekCurrentMedia, | 326 seekCurrentMedia: seekCurrentMedia, |
| 316 setCurrentMediaMute: setCurrentMediaMute, | 327 setCurrentMediaMute: setCurrentMediaMute, |
| 317 setCurrentMediaVolume: setCurrentMediaVolume, | 328 setCurrentMediaVolume: setCurrentMediaVolume, |
| 318 }; | 329 }; |
| 319 }); | 330 }); |
| OLD | NEW |