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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 this.host = host || null; | 130 this.host = host || null; |
131 | 131 |
132 /** @type {boolean} */ | 132 /** @type {boolean} */ |
133 this.isForced = isForced; | 133 this.isForced = isForced; |
134 }; | 134 }; |
135 | 135 |
136 /** | 136 /** |
137 * Placeholder object for AUTO cast mode. See comment in CastModeType. | 137 * Placeholder object for AUTO cast mode. See comment in CastModeType. |
138 * @const {!media_router.CastMode} | 138 * @const {!media_router.CastMode} |
139 */ | 139 */ |
140 var AUTO_CAST_MODE = new CastMode(media_router.CastModeType.AUTO, | 140 var AUTO_CAST_MODE = new CastMode( |
141 loadTimeData.getString('autoCastMode'), | 141 media_router.CastModeType.AUTO, loadTimeData.getString('autoCastMode'), |
142 null, false); | 142 null, false); |
143 | 143 |
144 /** | 144 /** |
145 * @param {number} id The ID of this issue. | 145 * @param {number} id The ID of this issue. |
146 * @param {string} title The issue title. | 146 * @param {string} title The issue title. |
147 * @param {string} message The issue message. | 147 * @param {string} message The issue message. |
148 * @param {number} defaultActionType The type of default action. | 148 * @param {number} defaultActionType The type of default action. |
149 * @param {number|undefined} secondaryActionType The type of optional action. | 149 * @param {number|undefined} secondaryActionType The type of optional action. |
150 * @param {?string} routeId The route ID to which this issue | 150 * @param {?string} routeId The route ID to which this issue |
151 * pertains. If not set, this is a global issue. | 151 * pertains. If not set, this is a global issue. |
152 * @param {boolean} isBlocking True if this issue blocks other UI. | 152 * @param {boolean} isBlocking True if this issue blocks other UI. |
153 * @param {?number} helpPageId The numeric help center ID. | 153 * @param {?number} helpPageId The numeric help center ID. |
154 * @constructor | 154 * @constructor |
155 * @struct | 155 * @struct |
156 */ | 156 */ |
157 var Issue = function(id, title, message, defaultActionType, | 157 var Issue = function( |
158 secondaryActionType, routeId, isBlocking, | 158 id, title, message, defaultActionType, secondaryActionType, routeId, |
159 helpPageId) { | 159 isBlocking, helpPageId) { |
160 /** @type {number} */ | 160 /** @type {number} */ |
161 this.id = id; | 161 this.id = id; |
162 | 162 |
163 /** @type {string} */ | 163 /** @type {string} */ |
164 this.title = title; | 164 this.title = title; |
165 | 165 |
166 /** @type {string} */ | 166 /** @type {string} */ |
167 this.message = message; | 167 this.message = message; |
168 | 168 |
169 /** @type {number} */ | 169 /** @type {number} */ |
(...skipping 19 matching lines...) Expand all Loading... |
189 * @param {string} description The short description of this route. | 189 * @param {string} description The short description of this route. |
190 * @param {?number} tabId The ID of the tab in which web app is running and | 190 * @param {?number} tabId The ID of the tab in which web app is running and |
191 * accessing the route. | 191 * accessing the route. |
192 * @param {boolean} isLocal True if this is a locally created route. | 192 * @param {boolean} isLocal True if this is a locally created route. |
193 * @param {boolean} canJoin True if this route can be joined. | 193 * @param {boolean} canJoin True if this route can be joined. |
194 * @param {?string} customControllerPath non-empty if this route has custom | 194 * @param {?string} customControllerPath non-empty if this route has custom |
195 * controller. | 195 * controller. |
196 * @constructor | 196 * @constructor |
197 * @struct | 197 * @struct |
198 */ | 198 */ |
199 var Route = function(id, sinkId, description, tabId, isLocal, canJoin, | 199 var Route = function( |
200 customControllerPath) { | 200 id, sinkId, description, tabId, isLocal, canJoin, customControllerPath) { |
201 /** @type {string} */ | 201 /** @type {string} */ |
202 this.id = id; | 202 this.id = id; |
203 | 203 |
204 /** @type {string} */ | 204 /** @type {string} */ |
205 this.sinkId = sinkId; | 205 this.sinkId = sinkId; |
206 | 206 |
207 /** @type {string} */ | 207 /** @type {string} */ |
208 this.description = description; | 208 this.description = description; |
209 | 209 |
210 /** @type {?number} */ | 210 /** @type {?number} */ |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 * @param {string} id The ID of the media sink. | 283 * @param {string} id The ID of the media sink. |
284 * @param {string} name The name of the sink. | 284 * @param {string} name The name of the sink. |
285 * @param {?string} description Optional description of the sink. | 285 * @param {?string} description Optional description of the sink. |
286 * @param {?string} domain Optional domain of the sink. | 286 * @param {?string} domain Optional domain of the sink. |
287 * @param {media_router.SinkIconType} iconType the type of icon for the sink. | 287 * @param {media_router.SinkIconType} iconType the type of icon for the sink. |
288 * @param {media_router.SinkStatus} status The readiness state of the sink. | 288 * @param {media_router.SinkStatus} status The readiness state of the sink. |
289 * @param {number} castModes Bitset of cast modes compatible with the sink. | 289 * @param {number} castModes Bitset of cast modes compatible with the sink. |
290 * @constructor | 290 * @constructor |
291 * @struct | 291 * @struct |
292 */ | 292 */ |
293 var Sink = function(id, name, description, domain, iconType, status, | 293 var Sink = function( |
294 castModes) { | 294 id, name, description, domain, iconType, status, castModes) { |
295 /** @type {string} */ | 295 /** @type {string} */ |
296 this.id = id; | 296 this.id = id; |
297 | 297 |
298 /** @type {string} */ | 298 /** @type {string} */ |
299 this.name = name; | 299 this.name = name; |
300 | 300 |
301 /** @type {?string} */ | 301 /** @type {?string} */ |
302 this.description = description; | 302 this.description = description; |
303 | 303 |
304 /** @type {?string} */ | 304 /** @type {?string} */ |
(...skipping 30 matching lines...) Expand all Loading... |
335 return { | 335 return { |
336 AUTO_CAST_MODE: AUTO_CAST_MODE, | 336 AUTO_CAST_MODE: AUTO_CAST_MODE, |
337 CastMode: CastMode, | 337 CastMode: CastMode, |
338 Issue: Issue, | 338 Issue: Issue, |
339 Route: Route, | 339 Route: Route, |
340 RouteStatus: RouteStatus, | 340 RouteStatus: RouteStatus, |
341 Sink: Sink, | 341 Sink: Sink, |
342 TabInfo: TabInfo, | 342 TabInfo: TabInfo, |
343 }; | 343 }; |
344 }); | 344 }); |
OLD | NEW |