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

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

Issue 2807823002: [Devtools] Updated format to store product registry data (Closed)
Patch Set: canges Created 3 years, 8 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/NetworkDataGridNode.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
index aafd190d2afa70d945695fd623085437c8bb017f..015fb7df46cfd91fd8e5f46bbdcf4d6dcb5368d6 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
@@ -44,6 +44,8 @@ Network.NetworkNode = class extends DataGrid.SortableDataGridNode {
this._showingInitiatorChain = false;
/** @type {?SDK.NetworkRequest} */
this._requestOrFirstKnownChildRequest = null;
+ /** @type {!Map<string, !UI.Icon>} */
+ this._columnIcons = new Map();
}
/**
@@ -612,15 +614,25 @@ Network.NetworkRequestNode = class extends Network.NetworkNode {
element.classList.toggle('network-error-row', this._isFailed());
element.classList.toggle('network-navigation-row', this._isNavigationRequest);
+ for (var rowDecorator of this._parentView.rowDecorators())
+ rowDecorator.decorate(this);
super.createCells(element);
}
/**
+ * @param {string} columnId
+ * @param {!UI.Icon} icon
+ */
+ setIconForColumn(columnId, icon) {
+ this._columnIcons.set(columnId, icon);
+ }
+
+ /**
* @param {!Element} element
* @param {string} text
*/
_setTextAndTitle(element, text) {
- element.textContent = text;
+ element.createTextChild(text);
element.title = text;
}
@@ -631,6 +643,9 @@ Network.NetworkRequestNode = class extends Network.NetworkNode {
*/
createCell(columnIdentifier) {
var cell = this.createTD(columnIdentifier);
+ var icon = this._columnIcons.get(columnIdentifier);
+ if (icon)
+ cell.appendChild(icon);
// If the key exists but the value is null it means the extension instance has not resolved yet.
// The view controller will force all rows to update when extension is resolved.
if (this._columnExtensions.has(columnIdentifier)) {

Powered by Google App Engine
This is Rietveld 408576698