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 | 7 |
8 cr.exportPath('media_router'); | 8 cr.exportPath('media_router'); |
9 | 9 |
10 /** | 10 /** |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 /** @type {boolean} */ | 200 /** @type {boolean} */ |
201 this.canJoin = canJoin; | 201 this.canJoin = canJoin; |
202 | 202 |
203 /** @type {number|undefined} */ | 203 /** @type {number|undefined} */ |
204 this.currentCastMode = undefined; | 204 this.currentCastMode = undefined; |
205 | 205 |
206 /** @type {?string} */ | 206 /** @type {?string} */ |
207 this.customControllerPath = customControllerPath; | 207 this.customControllerPath = customControllerPath; |
208 }; | 208 }; |
209 | 209 |
| 210 /** |
| 211 * @param {string} title The title of the route. |
| 212 * @param {string} description A description for the route. |
| 213 * @param {boolean} canPlayPause Whether the route can be played/paused. |
| 214 * @param {boolean} canMute Whether the route can be muted/unmuted. |
| 215 * @param {boolean} canSetVolume Whether the route volume can be changed. |
| 216 * @param {boolean} canSeek Whether the route's playback position can be |
| 217 * changed. |
| 218 * @param {boolean} isPaused Whether the route is paused. |
| 219 * @param {boolean} isMuted Whether the route is muted. |
| 220 * @param {number} volume The route's volume, between 0 and 1. |
| 221 * @param {number} duration The route's duration in seconds. |
| 222 * @param {number} currentTime The route's current position in seconds. |
| 223 * Must not be greater than |duration|. |
| 224 */ |
| 225 var RouteStatus = function(title, description, canPlayPause, canMute, |
| 226 canSetVolume, canSeek, isPaused, isMuted, volume, duration, currentTime) { |
| 227 |
| 228 /** @type {string} */ |
| 229 this.title = title; |
| 230 |
| 231 /** @type {string} */ |
| 232 this.description = description; |
| 233 |
| 234 /** @type {boolean} */ |
| 235 this.canPlayPause = canPlayPause; |
| 236 |
| 237 /** @type {boolean} */ |
| 238 this.canMute = canMute; |
| 239 |
| 240 /** @type {boolean} */ |
| 241 this.canSetVolume = canSetVolume; |
| 242 |
| 243 /** @type {boolean} */ |
| 244 this.canSeek = canSeek; |
| 245 |
| 246 /** @type {boolean} */ |
| 247 this.isPaused = isPaused; |
| 248 |
| 249 /** @type {boolean} */ |
| 250 this.isMuted = isMuted; |
| 251 |
| 252 /** @type {number} */ |
| 253 this.volume = volume; |
| 254 |
| 255 /** @type {number} */ |
| 256 this.duration = duration; |
| 257 |
| 258 /** @type {number} */ |
| 259 this.currentTime = currentTime; |
| 260 }; |
| 261 |
210 | 262 |
211 /** | 263 /** |
212 * @param {string} id The ID of the media sink. | 264 * @param {string} id The ID of the media sink. |
213 * @param {string} name The name of the sink. | 265 * @param {string} name The name of the sink. |
214 * @param {?string} description Optional description of the sink. | 266 * @param {?string} description Optional description of the sink. |
215 * @param {?string} domain Optional domain of the sink. | 267 * @param {?string} domain Optional domain of the sink. |
216 * @param {media_router.SinkIconType} iconType the type of icon for the sink. | 268 * @param {media_router.SinkIconType} iconType the type of icon for the sink. |
217 * @param {media_router.SinkStatus} status The readiness state of the sink. | 269 * @param {media_router.SinkStatus} status The readiness state of the sink. |
218 * @param {number} castModes Bitset of cast modes compatible with the sink. | 270 * @param {number} castModes Bitset of cast modes compatible with the sink. |
219 * @constructor | 271 * @constructor |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 311 |
260 /** @type {string} */ | 312 /** @type {string} */ |
261 this.domain = domain; | 313 this.domain = domain; |
262 }; | 314 }; |
263 | 315 |
264 return { | 316 return { |
265 AUTO_CAST_MODE: AUTO_CAST_MODE, | 317 AUTO_CAST_MODE: AUTO_CAST_MODE, |
266 CastMode: CastMode, | 318 CastMode: CastMode, |
267 Issue: Issue, | 319 Issue: Issue, |
268 Route: Route, | 320 Route: Route, |
| 321 RouteStatus: RouteStatus, |
269 Sink: Sink, | 322 Sink: Sink, |
270 TabInfo: TabInfo, | 323 TabInfo: TabInfo, |
271 }; | 324 }; |
272 }); | 325 }); |
OLD | NEW |