| 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @implements {WebInspector.TargetManager.Observer} | 7 * @implements {WebInspector.TargetManager.Observer} |
| 8 * @param {!Element} selectElement | 8 * @param {!Element} selectElement |
| 9 */ | 9 */ |
| 10 WebInspector.ConsoleContextSelector = function(selectElement) | 10 WebInspector.ConsoleContextSelector = function(selectElement) |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 this._executionContextDestroyed(executionContexts[i]); | 200 this._executionContextDestroyed(executionContexts[i]); |
| 201 } | 201 } |
| 202 }, | 202 }, |
| 203 | 203 |
| 204 /** | 204 /** |
| 205 * @param {!Element} option | 205 * @param {!Element} option |
| 206 */ | 206 */ |
| 207 _select: function(option) | 207 _select: function(option) |
| 208 { | 208 { |
| 209 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty
pe {?} */ (this._selectElement), option); | 209 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty
pe {?} */ (this._selectElement), option); |
| 210 this._updateSelectionWarning(); |
| 210 }, | 211 }, |
| 211 | 212 |
| 212 /** | 213 /** |
| 213 * @return {?Element} | 214 * @return {?Element} |
| 214 */ | 215 */ |
| 215 _selectedOption: function() | 216 _selectedOption: function() |
| 216 { | 217 { |
| 217 if (this._selectElement.selectedIndex >= 0) | 218 if (this._selectElement.selectedIndex >= 0) |
| 218 return this._selectElement[this._selectElement.selectedIndex]; | 219 return this._selectElement[this._selectElement.selectedIndex]; |
| 219 return null; | 220 return null; |
| 220 } | 221 } |
| 221 } | 222 } |
| OLD | NEW |