| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 /** @type {?string} */ | 115 /** @type {?string} */ |
| 116 this.customControllerPath = customControllerPath; | 116 this.customControllerPath = customControllerPath; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * @param {string} id The ID of the media sink. | 121 * @param {string} id The ID of the media sink. |
| 122 * @param {string} name The name of the sink. | 122 * @param {string} name The name of the sink. |
| 123 * @param {media_router.SinkStatus} status The readiness state of the sink. | 123 * @param {media_router.SinkStatus} status The readiness state of the sink. |
| 124 * @param {!Array<number>} castModes Cast modes compatible with the sink. | 124 * @param {!Array<number>} castModes Cast modes compatible with the sink. |
| 125 * @param {boolean} isLaunching True if the Media Router is creating a route |
| 126 * to this sink. |
| 125 * @constructor | 127 * @constructor |
| 126 * @struct | 128 * @struct |
| 127 */ | 129 */ |
| 128 var Sink = function(id, name, status, castModes) { | 130 var Sink = function(id, name, status, castModes, isLaunching) { |
| 129 /** @type {string} */ | 131 /** @type {string} */ |
| 130 this.id = id; | 132 this.id = id; |
| 131 | 133 |
| 132 /** @type {string} */ | 134 /** @type {string} */ |
| 133 this.name = name; | 135 this.name = name; |
| 134 | 136 |
| 135 /** @type {media_router.SinkStatus} */ | 137 /** @type {media_router.SinkStatus} */ |
| 136 this.status = status; | 138 this.status = status; |
| 137 | 139 |
| 138 /** @type {!Array<number>} */ | 140 /** @type {!Array<number>} */ |
| 139 this.castModes = castModes; | 141 this.castModes = castModes; |
| 142 |
| 143 /** @type {boolean} */ |
| 144 this.isLaunching = isLaunching; |
| 140 }; | 145 }; |
| 141 | 146 |
| 142 | 147 |
| 143 /** | 148 /** |
| 144 * @param {number} tabId The current tab ID. | 149 * @param {number} tabId The current tab ID. |
| 145 * @param {string} domain The domain of the current tab. | 150 * @param {string} domain The domain of the current tab. |
| 146 * @constructor | 151 * @constructor |
| 147 * @struct | 152 * @struct |
| 148 */ | 153 */ |
| 149 var TabInfo = function(tabId, domain) { | 154 var TabInfo = function(tabId, domain) { |
| 150 /** @type {number} */ | 155 /** @type {number} */ |
| 151 this.tabId = tabId; | 156 this.tabId = tabId; |
| 152 | 157 |
| 153 /** @type {string} */ | 158 /** @type {string} */ |
| 154 this.domain = domain; | 159 this.domain = domain; |
| 155 }; | 160 }; |
| 156 | 161 |
| 157 return { | 162 return { |
| 158 SinkStatus: SinkStatus, | 163 SinkStatus: SinkStatus, |
| 159 CastMode: CastMode, | 164 CastMode: CastMode, |
| 160 Issue: Issue, | 165 Issue: Issue, |
| 161 Route: Route, | 166 Route: Route, |
| 162 Sink: Sink, | 167 Sink: Sink, |
| 163 TabInfo: TabInfo, | 168 TabInfo: TabInfo, |
| 164 }; | 169 }; |
| 165 }); | 170 }); |
| OLD | NEW |