| 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 * @param {function(!Array<!WebInspector.NetworkConditionsGroup>):!Array<?WebIns
pector.NetworkManager.Conditions>} populateCallback | 7 * @param {function(!Array<!WebInspector.NetworkConditionsGroup>):!Array<?WebIns
pector.NetworkManager.Conditions>} populateCallback |
| 8 * @param {function(number)} selectCallback | 8 * @param {function(number)} selectCallback |
| 9 */ | 9 */ |
| 10 WebInspector.NetworkConditionsSelector = function(populateCallback, selectCallba
ck) | 10 WebInspector.NetworkConditionsSelector = function(populateCallback, selectCallba
ck) |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 this._list.show(this.contentElement); | 282 this._list.show(this.contentElement); |
| 283 | 283 |
| 284 this._customSetting = WebInspector.moduleSetting("customNetworkConditions"); | 284 this._customSetting = WebInspector.moduleSetting("customNetworkConditions"); |
| 285 this._customSetting.addChangeListener(this._conditionsUpdated, this); | 285 this._customSetting.addChangeListener(this._conditionsUpdated, this); |
| 286 | 286 |
| 287 this.setDefaultFocusedElement(addButton); | 287 this.setDefaultFocusedElement(addButton); |
| 288 this.contentElement.tabIndex = 0; | 288 this.contentElement.tabIndex = 0; |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 WebInspector.NetworkConditionsSettingsTab.prototype = { | 291 WebInspector.NetworkConditionsSettingsTab.prototype = { |
| 292 /** |
| 293 * @override |
| 294 */ |
| 292 wasShown: function() | 295 wasShown: function() |
| 293 { | 296 { |
| 294 WebInspector.VBox.prototype.wasShown.call(this); | 297 WebInspector.VBox.prototype.wasShown.call(this); |
| 295 this._conditionsUpdated(); | 298 this._conditionsUpdated(); |
| 296 }, | 299 }, |
| 297 | 300 |
| 298 _conditionsUpdated: function() | 301 _conditionsUpdated: function() |
| 299 { | 302 { |
| 300 this._list.clear(); | 303 this._list.clear(); |
| 301 | 304 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 [NetworkAgent.ResourcePriority.VeryLow, WebInspector.UIString("Lowes
t")], | 514 [NetworkAgent.ResourcePriority.VeryLow, WebInspector.UIString("Lowes
t")], |
| 512 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")], | 515 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")], |
| 513 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium
")], | 516 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium
")], |
| 514 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], | 517 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], |
| 515 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High
est")] | 518 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High
est")] |
| 516 ]); | 519 ]); |
| 517 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; | 520 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; |
| 518 } | 521 } |
| 519 return labelMap.get(priority) || WebInspector.UIString("Unknown"); | 522 return labelMap.get(priority) || WebInspector.UIString("Unknown"); |
| 520 }; | 523 }; |
| OLD | NEW |