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

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

Issue 2876983002: DevTools: group by frame, not product in the network panel. (Closed)
Patch Set: review comments Created 3 years, 7 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 5db1474fcd20d2d25bd47e2f5710cca96068ac95..dd37c5aa765798ba981d75705d8bbedcbccc1f1f 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -100,7 +100,7 @@ Network.NetworkLogView = class extends UI.VBox {
/** @type {!Map<string, !Network.GroupLookupInterface>} */
this._groupLookups = new Map();
- this._groupLookups.set('Frame', new Network.FrameGrouper(this));
+ this._groupLookups.set('Frame', new Network.NetworkFrameGrouper(this));
/** @type {?Network.GroupLookupInterface} */
this._activeGroupLookup = null;
@@ -119,6 +119,14 @@ Network.NetworkLogView = class extends UI.VBox {
SDK.NetworkManager, SDK.NetworkManager.Events.RequestUpdated, this._onRequestUpdated, this);
SDK.targetManager.addModelListener(
SDK.NetworkManager, SDK.NetworkManager.Events.RequestFinished, this._onRequestUpdated, this);
+
+ this._updateGroupByFrame();
+ Common.moduleSetting('network.group-by-frame').addChangeListener(() => this._updateGroupByFrame());
+ }
+
+ _updateGroupByFrame() {
+ var value = Common.moduleSetting('network.group-by-frame').get();
+ this._setGrouping(value ? 'Frame' : null);
}
/**
@@ -351,28 +359,14 @@ Network.NetworkLogView = class extends UI.VBox {
}
/**
- * @return {!Map<string, !Network.GroupLookupInterface>}
- */
- groupLookups() {
- return this._groupLookups;
- }
-
- /**
- * @param {string} groupKey
+ * @param {?string} groupKey
*/
- setGrouping(groupKey) {
- var groupLookup = this._groupLookups.get(groupKey) || null;
+ _setGrouping(groupKey) {
+ var groupLookup = groupKey ? this._groupLookups.get(groupKey) || null : null;
this._activeGroupLookup = groupLookup;
- if (!groupLookup) {
- this._invalidateAllItems();
- return;
- }
- groupLookup.initialize().then(() => {
- if (this._activeGroupLookup !== groupLookup)
- return;
- this._activeGroupLookup.reset();
- this._invalidateAllItems();
- });
+ if (groupLookup)
+ groupLookup.reset();
+ this._invalidateAllItems();
}
/**
@@ -1823,11 +1817,6 @@ Network.GroupLookupInterface = function() {};
Network.GroupLookupInterface.prototype = {
/**
- * @return {!Promise}
- */
- initialize: function() {},
-
- /**
* @param {!SDK.NetworkRequest} request
* @return {?Network.NetworkGroupNode}
*/

Powered by Google App Engine
This is Rietveld 408576698