| 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 // 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 * | 43 * |
| 44 * @param {!MediaRouterContainerElement} mediaRouterContainer | 44 * @param {!MediaRouterContainerElement} mediaRouterContainer |
| 45 */ | 45 */ |
| 46 function setContainer(mediaRouterContainer) { | 46 function setContainer(mediaRouterContainer) { |
| 47 container = mediaRouterContainer; | 47 container = mediaRouterContainer; |
| 48 } | 48 } |
| 49 | 49 |
| 50 /** | 50 /** |
| 51 * Populates the WebUI with data obtained from Media Router. | 51 * Populates the WebUI with data obtained from Media Router. |
| 52 * | 52 * |
| 53 * @param {deviceMissingUrl: string, | 53 * @param {{deviceMissingUrl: string, |
| 54 * sinks: !Array<!media_router.Sink>, | 54 * sinks: !Array<!media_router.Sink>, |
| 55 * routes: !Array<!media_router.Route>, | 55 * routes: !Array<!media_router.Route>, |
| 56 * castModes: !Array<!media_router.CastMode>} data | 56 * castModes: !Array<!media_router.CastMode>}} data |
| 57 * Parameters in data: | 57 * Parameters in data: |
| 58 * deviceMissingUrl - url to be opened on "Device missing?" clicked. | 58 * deviceMissingUrl - url to be opened on "Device missing?" clicked. |
| 59 * sinks - list of sinks to be displayed. | 59 * sinks - list of sinks to be displayed. |
| 60 * routes - list of routes that are associated with the sinks. | 60 * routes - list of routes that are associated with the sinks. |
| 61 * castModes - list of available cast modes. | 61 * castModes - list of available cast modes. |
| 62 */ | 62 */ |
| 63 function setInitialData(data) { | 63 function setInitialData(data) { |
| 64 container.deviceMissingUrl = data['deviceMissingUrl']; | 64 container.deviceMissingUrl = data['deviceMissingUrl']; |
| 65 container.castModeList = data['castModes']; | 65 container.castModeList = data['castModes']; |
| 66 container.allSinks = data['sinks']; | 66 container.allSinks = data['sinks']; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 return { | 171 return { |
| 172 actOnIssue: actOnIssue, | 172 actOnIssue: actOnIssue, |
| 173 closeDialog: closeDialog, | 173 closeDialog: closeDialog, |
| 174 closeRoute: closeRoute, | 174 closeRoute: closeRoute, |
| 175 reportSinkCount: reportSinkCount, | 175 reportSinkCount: reportSinkCount, |
| 176 requestInitialData: requestInitialData, | 176 requestInitialData: requestInitialData, |
| 177 requestRoute: requestRoute, | 177 requestRoute: requestRoute, |
| 178 }; | 178 }; |
| 179 }); | 179 }); |
| OLD | NEW |