Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // <include src="media_router_data.js"> | 5 // <include src="media_router_data.js"> |
| 6 // <include src="media_router_ui_interface.js"> | 6 // <include src="media_router_ui_interface.js"> |
| 7 | 7 |
| 8 // Handles user events for the Media Router UI. | 8 // Handles user events for the Media Router UI. |
| 9 cr.define('media_router', function() { | 9 cr.define('media_router', function() { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 /** | 209 /** |
| 210 * Creates a media route. | 210 * Creates a media route. |
| 211 * Called when the user requests to create a media route. | 211 * Called when the user requests to create a media route. |
| 212 * | 212 * |
| 213 * @param {!Event} event | 213 * @param {!Event} event |
| 214 * Parameters in |event|.detail: | 214 * Parameters in |event|.detail: |
| 215 * sinkId - sink ID selected by the user. | 215 * sinkId - sink ID selected by the user. |
| 216 * selectedCastModeValue - cast mode selected by the user. | 216 * selectedCastModeValue - cast mode selected by the user. |
| 217 */ | 217 */ |
| 218 function onCreateRoute(event) { | 218 function onCreateRoute(event) { |
| 219 /** @type {{sinkId: string, selectedCastModeValue, number}} */ | 219 /** @type {{sinkId: string, selectedCastModeValue: number}} */ |
|
mark a. foltz
2017/05/03 21:27:01
Good catch
| |
| 220 var detail = event.detail; | 220 var detail = event.detail; |
| 221 media_router.browserApi.requestRoute(detail.sinkId, | 221 media_router.browserApi.requestRoute(detail.sinkId, |
| 222 detail.selectedCastModeValue); | 222 detail.selectedCastModeValue); |
| 223 } | 223 } |
| 224 | 224 |
| 225 /** | 225 /** |
| 226 * Stops a route. | 226 * Stops a route. |
| 227 * Called when the user requests to stop a media route. | 227 * Called when the user requests to stop a media route. |
| 228 * | 228 * |
| 229 * @param {!Event} event | 229 * @param {!Event} event |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 379 function onWindowBlur() { | 379 function onWindowBlur() { |
| 380 media_router.browserApi.reportBlur(); | 380 media_router.browserApi.reportBlur(); |
| 381 } | 381 } |
| 382 | 382 |
| 383 return { | 383 return { |
| 384 initialize: initialize, | 384 initialize: initialize, |
| 385 }; | 385 }; |
| 386 }); | 386 }); |
| 387 | 387 |
| 388 window.addEventListener('load', media_router.initialize); | 388 window.addEventListener('load', media_router.initialize); |
| OLD | NEW |