| 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 // Any strings used here will already be localized. Values such as | 5 // Any strings used here will already be localized. Values such as |
| 6 // CastMode.type or IDs will be defined elsewhere and determined later. | 6 // CastMode.type or IDs will be defined elsewhere and determined later. |
| 7 cr.define('media_router', function() { | 7 cr.define('media_router', function() { |
| 8 'use strict'; | 8 'use strict'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 /** @type {?string} */ | 124 /** @type {?string} */ |
| 125 this.customControllerPath = customControllerPath; | 125 this.customControllerPath = customControllerPath; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 | 128 |
| 129 /** | 129 /** |
| 130 * @param {string} id The ID of the media sink. | 130 * @param {string} id The ID of the media sink. |
| 131 * @param {string} name The name of the sink. | 131 * @param {string} name The name of the sink. |
| 132 * @param {media_router.SinkStatus} status The readiness state of the sink. | 132 * @param {media_router.SinkStatus} status The readiness state of the sink. |
| 133 * @param {!Array<number>} castModes Cast modes compatible with the sink. | 133 * @param {!Array<number>} castModes Cast modes compatible with the sink. |
| 134 * @param {boolean} isLaunching True if the Media Router is creating a route |
| 135 * to this sink. |
| 134 * @constructor | 136 * @constructor |
| 135 * @struct | 137 * @struct |
| 136 */ | 138 */ |
| 137 var Sink = function(id, name, status, castModes) { | 139 var Sink = function(id, name, status, castModes, isLaunching) { |
| 138 /** @type {string} */ | 140 /** @type {string} */ |
| 139 this.id = id; | 141 this.id = id; |
| 140 | 142 |
| 141 /** @type {string} */ | 143 /** @type {string} */ |
| 142 this.name = name; | 144 this.name = name; |
| 143 | 145 |
| 144 /** @type {media_router.SinkStatus} */ | 146 /** @type {media_router.SinkStatus} */ |
| 145 this.status = status; | 147 this.status = status; |
| 146 | 148 |
| 147 /** @type {!Array<number>} */ | 149 /** @type {!Array<number>} */ |
| 148 this.castModes = castModes; | 150 this.castModes = castModes; |
| 151 |
| 152 /** @type {boolean} */ |
| 153 this.isLaunching = isLaunching; |
| 149 }; | 154 }; |
| 150 | 155 |
| 151 | 156 |
| 152 /** | 157 /** |
| 153 * @param {number} tabId The current tab ID. | 158 * @param {number} tabId The current tab ID. |
| 154 * @param {string} domain The domain of the current tab. | 159 * @param {string} domain The domain of the current tab. |
| 155 * @constructor | 160 * @constructor |
| 156 * @struct | 161 * @struct |
| 157 */ | 162 */ |
| 158 var TabInfo = function(tabId, domain) { | 163 var TabInfo = function(tabId, domain) { |
| 159 /** @type {number} */ | 164 /** @type {number} */ |
| 160 this.tabId = tabId; | 165 this.tabId = tabId; |
| 161 | 166 |
| 162 /** @type {string} */ | 167 /** @type {string} */ |
| 163 this.domain = domain; | 168 this.domain = domain; |
| 164 }; | 169 }; |
| 165 | 170 |
| 166 return { | 171 return { |
| 167 CastModeType: CastModeType, | 172 CastModeType: CastModeType, |
| 168 SinkStatus: SinkStatus, | 173 SinkStatus: SinkStatus, |
| 169 CastMode: CastMode, | 174 CastMode: CastMode, |
| 170 Issue: Issue, | 175 Issue: Issue, |
| 171 Route: Route, | 176 Route: Route, |
| 172 Sink: Sink, | 177 Sink: Sink, |
| 173 TabInfo: TabInfo, | 178 TabInfo: TabInfo, |
| 174 }; | 179 }; |
| 175 }); | 180 }); |
| OLD | NEW |