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

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..83fec4439800c685c3135c326d9459228d219663 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,19 +351,19 @@ Network.NetworkLogView = class extends UI.VBox {
}
/**
- * @param {?Network.NetworkGroupLookupInterface} grouping
+ * @param {?Network.GroupLookupInterface} grouping
*/
setGrouping(grouping) {
this._activeGroupLookup = grouping;
- this._nodeGroups.clear();
- this._invalidateAllItems();
- }
-
- /**
- * @return {!Set<!Network.NetworkRowDecorator>}
- */
- rowDecorators() {
- return this._rowDecorators;
+ if (!grouping) {
+ this._nodeGroups.clear();
+ this._invalidateAllItems();
+ return;
+ }
+ grouping.initialize().then(() => {
+ this._nodeGroups.clear();
+ this._invalidateAllItems();
+ });
}
/**
@@ -498,12 +497,6 @@ Network.NetworkLogView = class extends UI.VBox {
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 +893,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 +954,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,30 +1810,23 @@ Network.NetworkLogView.Filter;
/**
* @interface
*/
-Network.NetworkGroupLookupInterface = function() {};
+Network.GroupLookupInterface = function() {};
+
+Network.GroupLookupInterface.prototype = {
+ /**
+ * @return {!Promise}
+ */
+ initialize: function() {},
-Network.NetworkGroupLookupInterface.prototype = {
/**
* @param {!SDK.NetworkRequest} request
* @return {?*}
*/
- groupForRequest(request) {},
+ groupForRequest: function(request) {},
/**
* @param {!*} key
* @return {string}
*/
- groupName(key) {}
-};
-
-/**
- * @interface
- */
-Network.NetworkRowDecorator = function() {};
-
-Network.NetworkRowDecorator.prototype = {
- /**
- * @param {!Network.NetworkNode} node
- */
- decorate(node) {}
+ groupName: function(key) {}
};

Powered by Google App Engine
This is Rietveld 408576698