| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 this.description = description; | 114 this.description = description; |
| 115 | 115 |
| 116 /** @type {?string} */ | 116 /** @type {?string} */ |
| 117 this.host = host || null; | 117 this.host = host || null; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Placeholder object for AUTO cast mode. See comment in CastModeType. | 121 * Placeholder object for AUTO cast mode. See comment in CastModeType. |
| 122 * @const {!media_router.CastMode} | 122 * @const {!media_router.CastMode} |
| 123 */ | 123 */ |
| 124 var AUTO_CAST_MODE = new CastMode(media_router.CastModeType.AUTO, | 124 var AUTO_CAST_MODE = new CastMode( |
| 125 loadTimeData.getString('autoCastMode'), null); | 125 media_router.CastModeType.AUTO, loadTimeData.getString('autoCastMode'), |
| 126 null); |
| 126 | 127 |
| 127 /** | 128 /** |
| 128 * @param {number} id The ID of this issue. | 129 * @param {number} id The ID of this issue. |
| 129 * @param {string} title The issue title. | 130 * @param {string} title The issue title. |
| 130 * @param {string} message The issue message. | 131 * @param {string} message The issue message. |
| 131 * @param {number} defaultActionType The type of default action. | 132 * @param {number} defaultActionType The type of default action. |
| 132 * @param {number|undefined} secondaryActionType The type of optional action. | 133 * @param {number|undefined} secondaryActionType The type of optional action. |
| 133 * @param {?string} routeId The route ID to which this issue | 134 * @param {?string} routeId The route ID to which this issue |
| 134 * pertains. If not set, this is a global issue. | 135 * pertains. If not set, this is a global issue. |
| 135 * @param {boolean} isBlocking True if this issue blocks other UI. | 136 * @param {boolean} isBlocking True if this issue blocks other UI. |
| 136 * @param {?number} helpPageId The numeric help center ID. | 137 * @param {?number} helpPageId The numeric help center ID. |
| 137 * @constructor | 138 * @constructor |
| 138 * @struct | 139 * @struct |
| 139 */ | 140 */ |
| 140 var Issue = function(id, title, message, defaultActionType, | 141 var Issue = function( |
| 141 secondaryActionType, routeId, isBlocking, | 142 id, title, message, defaultActionType, secondaryActionType, routeId, |
| 142 helpPageId) { | 143 isBlocking, helpPageId) { |
| 143 /** @type {number} */ | 144 /** @type {number} */ |
| 144 this.id = id; | 145 this.id = id; |
| 145 | 146 |
| 146 /** @type {string} */ | 147 /** @type {string} */ |
| 147 this.title = title; | 148 this.title = title; |
| 148 | 149 |
| 149 /** @type {string} */ | 150 /** @type {string} */ |
| 150 this.message = message; | 151 this.message = message; |
| 151 | 152 |
| 152 /** @type {number} */ | 153 /** @type {number} */ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 172 * @param {string} description The short description of this route. | 173 * @param {string} description The short description of this route. |
| 173 * @param {?number} tabId The ID of the tab in which web app is running and | 174 * @param {?number} tabId The ID of the tab in which web app is running and |
| 174 * accessing the route. | 175 * accessing the route. |
| 175 * @param {boolean} isLocal True if this is a locally created route. | 176 * @param {boolean} isLocal True if this is a locally created route. |
| 176 * @param {boolean} canJoin True if this route can be joined. | 177 * @param {boolean} canJoin True if this route can be joined. |
| 177 * @param {?string} customControllerPath non-empty if this route has custom | 178 * @param {?string} customControllerPath non-empty if this route has custom |
| 178 * controller. | 179 * controller. |
| 179 * @constructor | 180 * @constructor |
| 180 * @struct | 181 * @struct |
| 181 */ | 182 */ |
| 182 var Route = function(id, sinkId, description, tabId, isLocal, canJoin, | 183 var Route = function( |
| 183 customControllerPath) { | 184 id, sinkId, description, tabId, isLocal, canJoin, customControllerPath) { |
| 184 /** @type {string} */ | 185 /** @type {string} */ |
| 185 this.id = id; | 186 this.id = id; |
| 186 | 187 |
| 187 /** @type {string} */ | 188 /** @type {string} */ |
| 188 this.sinkId = sinkId; | 189 this.sinkId = sinkId; |
| 189 | 190 |
| 190 /** @type {string} */ | 191 /** @type {string} */ |
| 191 this.description = description; | 192 this.description = description; |
| 192 | 193 |
| 193 /** @type {?number} */ | 194 /** @type {?number} */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 211 * @param {string} id The ID of the media sink. | 212 * @param {string} id The ID of the media sink. |
| 212 * @param {string} name The name of the sink. | 213 * @param {string} name The name of the sink. |
| 213 * @param {?string} description Optional description of the sink. | 214 * @param {?string} description Optional description of the sink. |
| 214 * @param {?string} domain Optional domain of the sink. | 215 * @param {?string} domain Optional domain of the sink. |
| 215 * @param {media_router.SinkIconType} iconType the type of icon for the sink. | 216 * @param {media_router.SinkIconType} iconType the type of icon for the sink. |
| 216 * @param {media_router.SinkStatus} status The readiness state of the sink. | 217 * @param {media_router.SinkStatus} status The readiness state of the sink. |
| 217 * @param {number} castModes Bitset of cast modes compatible with the sink. | 218 * @param {number} castModes Bitset of cast modes compatible with the sink. |
| 218 * @constructor | 219 * @constructor |
| 219 * @struct | 220 * @struct |
| 220 */ | 221 */ |
| 221 var Sink = function(id, name, description, domain, iconType, status, | 222 var Sink = function( |
| 222 castModes) { | 223 id, name, description, domain, iconType, status, castModes) { |
| 223 /** @type {string} */ | 224 /** @type {string} */ |
| 224 this.id = id; | 225 this.id = id; |
| 225 | 226 |
| 226 /** @type {string} */ | 227 /** @type {string} */ |
| 227 this.name = name; | 228 this.name = name; |
| 228 | 229 |
| 229 /** @type {?string} */ | 230 /** @type {?string} */ |
| 230 this.description = description; | 231 this.description = description; |
| 231 | 232 |
| 232 /** @type {?string} */ | 233 /** @type {?string} */ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 262 | 263 |
| 263 return { | 264 return { |
| 264 AUTO_CAST_MODE: AUTO_CAST_MODE, | 265 AUTO_CAST_MODE: AUTO_CAST_MODE, |
| 265 CastMode: CastMode, | 266 CastMode: CastMode, |
| 266 Issue: Issue, | 267 Issue: Issue, |
| 267 Route: Route, | 268 Route: Route, |
| 268 Sink: Sink, | 269 Sink: Sink, |
| 269 TabInfo: TabInfo, | 270 TabInfo: TabInfo, |
| 270 }; | 271 }; |
| 271 }); | 272 }); |
| OLD | NEW |