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

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

Issue 2839273003: [Devtools] New structure and colorize rows for network products (Closed)
Patch Set: changes 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/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index 7e8d4a06d4e88ea0d8a449ab558c212034fcc81e..52976d8f39b24c2eec35b64597617fb4819301f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -57,9 +57,11 @@ Network.NetworkLogView = class extends UI.VBox {
this._durationCalculator = new Network.NetworkTransferDurationCalculator();
this._calculator = this._timeCalculator;
- /** @type {?Network.NetworkGroupLookupInterface} */
+ /** @type {?Network.GroupLookupInterface} */
this._activeGroupLookup = null;
+ this._productRegistryRequested = false;
+
/**
* @this {Network.NetworkLogView}
*/
@@ -76,9 +78,6 @@ Network.NetworkLogView = class extends UI.VBox {
this._nodesByRequestId = new Map();
/** @type {!Map<*, !Network.NetworkGroupNode>} */
this._nodeGroups = new Map();
- /** @type {!Set<!Network.NetworkRowDecorator>} */
- this._rowDecorators = new Set();
-
/** @type {!Object.<string, boolean>} */
this._staleRequestIds = {};
/** @type {number} */
@@ -352,7 +351,7 @@ Network.NetworkLogView = class extends UI.VBox {
}
/**
- * @param {?Network.NetworkGroupLookupInterface} grouping
+ * @param {?Network.GroupLookupInterface} grouping
*/
setGrouping(grouping) {
this._activeGroupLookup = grouping;
@@ -361,13 +360,6 @@ Network.NetworkLogView = class extends UI.VBox {
}
/**
- * @return {!Set<!Network.NetworkRowDecorator>}
- */
- rowDecorators() {
- return this._rowDecorators;
- }
-
- /**
* @param {!SDK.NetworkRequest} request
* @return {?Network.NetworkRequestNode}
*/
@@ -494,16 +486,20 @@ Network.NetworkLogView = class extends UI.VBox {
this._filterRequests();
}
+ initializeProductRegistryIfNeeded() {
+ if (this._productRegistryRequested)
+ return;
+ this._productRegistryRequested = true;
+ if (ProductRegistry.existingInstance())
+ this._invalidateAllItems();
+ else
+ ProductRegistry.instance().then(() => this._invalidateAllItems());
+ }
+
_initializeView() {
this.element.id = 'network-container';
this._setupDataGrid();
- self.runtime.allInstances(Network.NetworkRowDecorator).then(instances => {
- for (var instance of instances)
- this._rowDecorators.add(instance);
- this._invalidateAllItems(true);
- });
-
this._columns.show(this.element);
this._summaryBarElement = this.element.createChild('div', 'network-summary-bar');
@@ -900,7 +896,6 @@ Network.NetworkLogView = class extends UI.VBox {
if (group)
return group;
group = new Network.NetworkGroupNode(this, this._activeGroupLookup.groupName(groupKey));
- group.setColumnExtensions(this._columns.columnExtensions());
this._nodeGroups.set(groupKey, group);
return group;
}
@@ -962,7 +957,6 @@ Network.NetworkLogView = class extends UI.VBox {
*/
_appendRequest(request) {
var node = new Network.NetworkRequestNode(this, request);
- node.setColumnExtensions(this._columns.columnExtensions());
node[Network.NetworkLogView._isFilteredOutSymbol] = true;
node[Network.NetworkLogView._isMatchingSearchQuerySymbol] = false;
@@ -1819,9 +1813,9 @@ Network.NetworkLogView.Filter;
/**
* @interface
*/
-Network.NetworkGroupLookupInterface = function() {};
+Network.GroupLookupInterface = function() {};
-Network.NetworkGroupLookupInterface.prototype = {
+Network.GroupLookupInterface.prototype = {
/**
* @param {!SDK.NetworkRequest} request
* @return {?*}
@@ -1834,15 +1828,3 @@ Network.NetworkGroupLookupInterface.prototype = {
*/
groupName(key) {}
};
-
-/**
- * @interface
- */
-Network.NetworkRowDecorator = function() {};
-
-Network.NetworkRowDecorator.prototype = {
- /**
- * @param {!Network.NetworkNode} node
- */
- decorate(node) {}
-};

Powered by Google App Engine
This is Rietveld 408576698