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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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']; |
67 container.routeList = data['routes']; | 67 container.routeList = data['routes']; |
| 68 container.maybeShowRouteDetailsOnOpen(); |
68 media_router.browserApi.onInitialDataReceived(); | 69 media_router.browserApi.onInitialDataReceived(); |
69 } | 70 } |
70 | 71 |
71 /** | 72 /** |
72 * Sets current issue to |issue|, or clears the current issue if |issue| is | 73 * Sets current issue to |issue|, or clears the current issue if |issue| is |
73 * null. | 74 * null. |
74 * | 75 * |
75 * @param {?media_router.Issue} issue | 76 * @param {?media_router.Issue} issue |
76 */ | 77 */ |
77 function setIssue(issue) { | 78 function setIssue(issue) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return { | 180 return { |
180 actOnIssue: actOnIssue, | 181 actOnIssue: actOnIssue, |
181 closeDialog: closeDialog, | 182 closeDialog: closeDialog, |
182 closeRoute: closeRoute, | 183 closeRoute: closeRoute, |
183 onInitialDataReceived: onInitialDataReceived, | 184 onInitialDataReceived: onInitialDataReceived, |
184 reportSinkCount: reportSinkCount, | 185 reportSinkCount: reportSinkCount, |
185 requestInitialData: requestInitialData, | 186 requestInitialData: requestInitialData, |
186 requestRoute: requestRoute, | 187 requestRoute: requestRoute, |
187 }; | 188 }; |
188 }); | 189 }); |
OLD | NEW |