Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Components.NetworkConditionsSelector = class { 7 Components.NetworkConditionsSelector = class {
8 /** 8 /**
9 * @param {function(!Array<!Components.NetworkConditionsGroup>):!Array<?SDK.Ne tworkManager.Conditions>} populateCallback 9 * @param {function(!Array<!Components.NetworkConditionsGroup>):!Array<?SDK.Ne tworkManager.Conditions>} populateCallback
10 * @param {function(number)} selectCallback 10 * @param {function(number)} selectCallback
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 * @implements {UI.ListWidget.Delegate} 261 * @implements {UI.ListWidget.Delegate}
262 * @unrestricted 262 * @unrestricted
263 */ 263 */
264 Components.NetworkConditionsSettingsTab = class extends UI.VBox { 264 Components.NetworkConditionsSettingsTab = class extends UI.VBox {
265 constructor() { 265 constructor() {
266 super(true); 266 super(true);
267 this.registerRequiredCSS('components/networkConditionsSettingsTab.css'); 267 this.registerRequiredCSS('components/networkConditionsSettingsTab.css');
268 268
269 this.contentElement.createChild('div', 'header').textContent = Common.UIStri ng('Network Throttling Profiles'); 269 this.contentElement.createChild('div', 'header').textContent = Common.UIStri ng('Network Throttling Profiles');
270 270
271 var addButton = createTextButton( 271 var addButton = UI.createTextButton(
272 Common.UIString('Add custom profile...'), this._addButtonClicked.bind(th is), 'add-conditions-button'); 272 Common.UIString('Add custom profile...'), this._addButtonClicked.bind(th is), 'add-conditions-button');
273 this.contentElement.appendChild(addButton); 273 this.contentElement.appendChild(addButton);
274 274
275 this._list = new UI.ListWidget(this); 275 this._list = new UI.ListWidget(this);
276 this._list.element.classList.add('conditions-list'); 276 this._list.element.classList.add('conditions-list');
277 this._list.registerRequiredCSS('components/networkConditionsSettingsTab.css' ); 277 this._list.registerRequiredCSS('components/networkConditionsSettingsTab.css' );
278 this._list.show(this.contentElement); 278 this._list.show(this.contentElement);
279 279
280 this._customSetting = Common.moduleSetting('customNetworkConditions'); 280 this._customSetting = Common.moduleSetting('customNetworkConditions');
281 this._customSetting.addChangeListener(this._conditionsUpdated, this); 281 this._customSetting.addChangeListener(this._conditionsUpdated, this);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 [Protocol.Network.ResourcePriority.VeryLow, Common.UIString('Lowest')], 494 [Protocol.Network.ResourcePriority.VeryLow, Common.UIString('Lowest')],
495 [Protocol.Network.ResourcePriority.Low, Common.UIString('Low')], 495 [Protocol.Network.ResourcePriority.Low, Common.UIString('Low')],
496 [Protocol.Network.ResourcePriority.Medium, Common.UIString('Medium')], 496 [Protocol.Network.ResourcePriority.Medium, Common.UIString('Medium')],
497 [Protocol.Network.ResourcePriority.High, Common.UIString('High')], 497 [Protocol.Network.ResourcePriority.High, Common.UIString('High')],
498 [Protocol.Network.ResourcePriority.VeryHigh, Common.UIString('Highest')] 498 [Protocol.Network.ResourcePriority.VeryHigh, Common.UIString('Highest')]
499 ]); 499 ]);
500 Components.uiLabelForPriority._priorityToUILabel = labelMap; 500 Components.uiLabelForPriority._priorityToUILabel = labelMap;
501 } 501 }
502 return labelMap.get(priority) || Common.UIString('Unknown'); 502 return labelMap.get(priority) || Common.UIString('Unknown');
503 }; 503 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698