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

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: 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 1f73b49bb2ca54f6bed6abb8651cdd69080d574e..38528bc84e1274d5ab7300d3b9a3c6546e48f8ef 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.FrameGrouper(this));
/** @type {?Network.GroupLookupInterface} */
this._activeGroupLookup = null;
@@ -119,6 +119,15 @@ 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.contentElement.classList.toggle('network-group-by-frame', value);
+ this._setGrouping(value ? 'frame' : null);
}
/**
@@ -351,17 +360,10 @@ 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();

Powered by Google App Engine
This is Rietveld 408576698