| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // setting was implemented. These users will see the first run flow | 74 // setting was implemented. These users will see the first run flow |
| 75 // again. | 75 // again. |
| 76 container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged'] || | 76 container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged'] || |
| 77 container.showFirstRunFlowCloudPref; | 77 container.showFirstRunFlowCloudPref; |
| 78 } | 78 } |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * Populates the WebUI with data obtained from Media Router. | 81 * Populates the WebUI with data obtained from Media Router. |
| 82 * | 82 * |
| 83 * @param {{deviceMissingUrl: string, | 83 * @param {{deviceMissingUrl: string, |
| 84 * sinksAndIdentity: {{ | 84 * sinksAndIdentity: { |
| 85 * sinks: !Array<!media_router.Sink>, | 85 * sinks: !Array<!media_router.Sink>, |
| 86 * showEmail: boolean, | 86 * showEmail: boolean, |
| 87 * userEmail: string, | 87 * userEmail: string, |
| 88 * showDomain: boolean, | 88 * showDomain: boolean, |
| 89 * userDomain: string | 89 * userDomain: string |
| 90 * }}, | 90 * }, |
| 91 * routes: !Array<!media_router.Route>, | 91 * routes: !Array<!media_router.Route>, |
| 92 * castModes: !Array<!media_router.CastMode>}} data | 92 * castModes: !Array<!media_router.CastMode>}} data |
| 93 * Parameters in data: | 93 * Parameters in data: |
| 94 * deviceMissingUrl - url to be opened on "Device missing?" clicked. | 94 * deviceMissingUrl - url to be opened on "Device missing?" clicked. |
| 95 * sinksAndIdentity - list of sinks to be displayed and user identity. | 95 * sinksAndIdentity - list of sinks to be displayed and user identity. |
| 96 * routes - list of routes that are associated with the sinks. | 96 * routes - list of routes that are associated with the sinks. |
| 97 * castModes - list of available cast modes. | 97 * castModes - list of available cast modes. |
| 98 */ | 98 */ |
| 99 function setInitialData(data) { | 99 function setInitialData(data) { |
| 100 container.deviceMissingUrl = data['deviceMissingUrl']; | 100 container.deviceMissingUrl = data['deviceMissingUrl']; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 reportNavigateToView: reportNavigateToView, | 344 reportNavigateToView: reportNavigateToView, |
| 345 reportSelectedCastMode: reportSelectedCastMode, | 345 reportSelectedCastMode: reportSelectedCastMode, |
| 346 reportRouteCreation: reportRouteCreation, | 346 reportRouteCreation: reportRouteCreation, |
| 347 reportSinkCount: reportSinkCount, | 347 reportSinkCount: reportSinkCount, |
| 348 reportTimeToClickSink: reportTimeToClickSink, | 348 reportTimeToClickSink: reportTimeToClickSink, |
| 349 reportTimeToInitialActionClose: reportTimeToInitialActionClose, | 349 reportTimeToInitialActionClose: reportTimeToInitialActionClose, |
| 350 requestInitialData: requestInitialData, | 350 requestInitialData: requestInitialData, |
| 351 requestRoute: requestRoute, | 351 requestRoute: requestRoute, |
| 352 }; | 352 }; |
| 353 }); | 353 }); |
| OLD | NEW |