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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js

Issue 2938503002: DevTools: unify Network & CPU throttling (Closed)
Patch Set: update test Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js
index f53b6b2699f09dcd78f7ab1b773f3fe499d71900..423f4c978ec691b62e0ae68f3b69ebfa617beca7 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js
@@ -187,8 +187,10 @@ Network.NetworkPanel = class extends UI.Panel {
this._panelToolbar.appendToolbarItem(this._disableCacheCheckbox);
this._panelToolbar.appendSeparator();
- this._panelToolbar.appendToolbarItem(MobileThrottling.NetworkConditionsSelector.createOfflineToolbarCheckbox());
- this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect());
+ this._offlineCheckbox = MobileThrottling.throttlingManager().createOfflineToolbarCheckbox();
+ this._panelToolbar.appendToolbarItem(this._offlineCheckbox);
+ this._throttlingSelect = this._createThrottlingConditionsSelect();
+ this._panelToolbar.appendToolbarItem(this._throttlingSelect);
this._panelToolbar.appendToolbarItem(new UI.ToolbarItem(this._progressBarContainer));
}
@@ -196,10 +198,10 @@ Network.NetworkPanel = class extends UI.Panel {
/**
* @return {!UI.ToolbarComboBox}
*/
- _createNetworkConditionsSelect() {
+ _createThrottlingConditionsSelect() {
var toolbarItem = new UI.ToolbarComboBox(null);
- toolbarItem.setMaxWidth(140);
- MobileThrottling.NetworkConditionsSelector.decorateSelect(toolbarItem.selectElement());
+ toolbarItem.setMaxWidth(160);
+ MobileThrottling.throttlingManager().decorateSelectWithNetworkThrottling(toolbarItem.selectElement());
return toolbarItem;
}

Powered by Google App Engine
This is Rietveld 408576698