Chromium Code Reviews| 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 2aa7048e92790331e2893a2d1a8f2f39efcce333..c0709a4ddea5f1d97f937ed0318573ca8e5927e4 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,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()); |
|
dgozman
2017/05/13 00:32:34
(..., this._updateGroupByFrame, this)
pfeldman
2017/05/15 14:53:02
I am now using these, because I think performance-
|
| + } |
| + |
| + _updateGroupByFrame() { |
| + var value = Common.moduleSetting('network.group-by-frame').get(); |
| + this.contentElement.classList.toggle('network-group-by-frame', value); |
|
dgozman
2017/05/13 00:32:34
Is this class ever used?
pfeldman
2017/05/15 14:53:02
Done.
|
| + this._setGrouping(value ? 'Frame' : null); |
| } |
| /** |
| @@ -351,28 +360,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 +1818,6 @@ Network.NetworkLogView.Filter; |
| Network.GroupLookupInterface = function() {}; |
| Network.GroupLookupInterface.prototype = { |
| - /** |
| - * @return {!Promise} |
| - */ |
| - initialize: function() {}, |
| - |
| /** |
| * @param {!SDK.NetworkRequest} request |
| * @return {?Network.NetworkGroupNode} |