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

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

Issue 1582093002: [DevTools] Turn NetworkConditionsSettingsTab into web component, move to network module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/NetworkConditionsSelector.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkConditionsSelector.js
similarity index 94%
rename from third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js
rename to third_party/WebKit/Source/devtools/front_end/network/NetworkConditionsSelector.js
index ba97f49e9f63508914e9691ae31c6267686c5cd8..8451274f76275046ae1a013aa02f8d054c90eead 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkConditionsSelector.js
@@ -126,27 +126,24 @@ WebInspector.NetworkConditionsSelector.prototype = {
*/
WebInspector.NetworkConditionsSettingsTab = function()
{
- WebInspector.VBox.call(this);
- this.element.classList.add("settings-tab-container");
- this.element.classList.add("network-conditions-settings-tab");
- this.registerRequiredCSS("components/networkConditionsSettingsTab.css");
+ WebInspector.VBox.call(this, true);
+ this.registerRequiredCSS("network/networkConditionsSettingsTab.css");
- var header = this.element.createChild("header");
- header.createChild("h3").createTextChild(WebInspector.UIString("Network Throttling Profiles"));
- this.containerElement = this.element.createChild("div", "help-container-wrapper").createChild("div", "settings-tab help-content help-container");
+ this.contentElement.createChild("div", "header").textContent = WebInspector.UIString("Network Throttling Profiles");
- var buttonsRow = this.containerElement.createChild("div", "button-row");
- var addButton = createTextButton(WebInspector.UIString("Add custom profile..."), this._addButtonClicked.bind(this));
- buttonsRow.appendChild(addButton);
+ var addButton = createTextButton(WebInspector.UIString("Add custom profile..."), this._addButtonClicked.bind(this), "add-conditions-button");
+ this.contentElement.appendChild(addButton);
this._list = new WebInspector.ListWidget(this);
- this._list.registerRequiredCSS("components/networkConditionsSettingsTab.css");
- this._list.show(this.containerElement);
+ this._list.element.classList.add("conditions-list");
+ this._list.registerRequiredCSS("network/networkConditionsSettingsTab.css");
+ this._list.show(this.contentElement);
this._customSetting = WebInspector.moduleSetting("networkConditionsCustomProfiles");
this._customSetting.addChangeListener(this._conditionsUpdated, this);
this.setDefaultFocusedElement(addButton);
+ this.contentElement.tabIndex = 0;
}
WebInspector.NetworkConditionsSettingsTab.prototype = {

Powered by Google App Engine
This is Rietveld 408576698