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

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

Issue 2788793002: [Devtools] Added frame grouping to network panel (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4cef0d366be55bae10ee8ff96e56376d9abfc7d1..120cc41b8c086c962de7f9ea416c283c94ff85e9 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -74,7 +74,7 @@ Network.NetworkLogView = class extends UI.VBox {
/** @type {!Map.<string, !Network.NetworkRequestNode>} */
this._nodesByRequestId = new Map();
- /** @type {!Map.<string, !Network.NetworkGroupNode>} */
+ /** @type {!Map<*, !Network.NetworkGroupNode>} */
this._nodeGroups = new Map();
/** @type {!Object.<string, boolean>} */
this._staleRequestIds = {};
@@ -353,6 +353,7 @@ Network.NetworkLogView = class extends UI.VBox {
*/
setGrouping(grouping) {
this._activeGroupLookup = grouping;
+ this._nodeGroups.clear();
this._invalidateAllItems();
}
@@ -874,16 +875,16 @@ Network.NetworkLogView = class extends UI.VBox {
if (!this._activeGroupLookup)
return this._dataGrid.rootNode();
- var groupName = this._activeGroupLookup.lookup(node.request());
- if (!groupName)
+ var groupKey = this._activeGroupLookup.groupForRequest(node.request());
+ if (!groupKey)
return this._dataGrid.rootNode();
- var group = this._nodeGroups.get(groupName);
+ var group = this._nodeGroups.get(groupKey);
if (group)
return group;
- group = new Network.NetworkGroupNode(this, groupName);
+ group = new Network.NetworkGroupNode(this, this._activeGroupLookup.groupName(groupKey));
group.setColumnExtensions(this._columns.columnExtensions());
- this._nodeGroups.set(groupName, group);
+ this._nodeGroups.set(groupKey, group);
return group;
}
@@ -1808,7 +1809,13 @@ Network.NetworkGroupLookupInterface = function() {};
Network.NetworkGroupLookupInterface.prototype = {
/**
* @param {!SDK.NetworkRequest} request
- * @return {?string}
+ * @return {?*}
+ */
+ groupForRequest(request) {},
+
+ /**
+ * @param {!*} key
+ * @return {string}
*/
- lookup(request) {}
+ groupName(key) {}
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698