Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr ue, "wss": true}; | 103 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr ue, "wss": true}; |
| 104 | 104 |
| 105 WebInspector.NetworkLogView._waterfallMinOvertime = 1; | 105 WebInspector.NetworkLogView._waterfallMinOvertime = 1; |
| 106 WebInspector.NetworkLogView._waterfallMaxOvertime = 3; | 106 WebInspector.NetworkLogView._waterfallMaxOvertime = 3; |
| 107 | 107 |
| 108 /** @enum {symbol} */ | 108 /** @enum {symbol} */ |
| 109 WebInspector.NetworkLogView.Events = { | 109 WebInspector.NetworkLogView.Events = { |
| 110 RequestSelected: Symbol("RequestSelected"), | 110 RequestSelected: Symbol("RequestSelected"), |
| 111 SearchCountUpdated: Symbol("SearchCountUpdated"), | 111 SearchCountUpdated: Symbol("SearchCountUpdated"), |
| 112 SearchIndexUpdated: Symbol("SearchIndexUpdated"), | 112 SearchIndexUpdated: Symbol("SearchIndexUpdated"), |
| 113 UpdateRequest: Symbol("UpdateRequest") | 113 UpdateRequest: Symbol("UpdateRequest"), |
| 114 RequestsSorted: Symbol("RequestsSorted"), | |
|
dgozman
2016/10/10 23:30:18
I feel like this should be direct calls instead of
| |
| 115 DataRefreshed: Symbol("DataRefreshed") | |
| 114 } | 116 } |
| 115 | 117 |
| 116 /** @enum {string} */ | 118 /** @enum {string} */ |
| 117 WebInspector.NetworkLogView.FilterType = { | 119 WebInspector.NetworkLogView.FilterType = { |
| 118 Domain: "domain", | 120 Domain: "domain", |
| 119 HasResponseHeader: "has-response-header", | 121 HasResponseHeader: "has-response-header", |
| 120 Is: "is", | 122 Is: "is", |
| 121 LargerThan: "larger-than", | 123 LargerThan: "larger-than", |
| 122 Method: "method", | 124 Method: "method", |
| 123 MimeType: "mime-type", | 125 MimeType: "mime-type", |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 664 if (!this.calculator().boundary().equals(oldBoundary)) { | 666 if (!this.calculator().boundary().equals(oldBoundary)) { |
| 665 // The boundaries changed, so all item graphs are stale. | 667 // The boundaries changed, so all item graphs are stale. |
| 666 this._columns.updateDividersIfNeeded(); | 668 this._columns.updateDividersIfNeeded(); |
| 667 var nodes = this._nodesByRequestId.valuesArray(); | 669 var nodes = this._nodesByRequestId.valuesArray(); |
| 668 for (var i = 0; i < nodes.length; ++i) | 670 for (var i = 0; i < nodes.length; ++i) |
| 669 nodes[i].refreshGraph(); | 671 nodes[i].refreshGraph(); |
| 670 } | 672 } |
| 671 | 673 |
| 672 this._staleRequestIds = {}; | 674 this._staleRequestIds = {}; |
| 673 this._updateSummaryBar(); | 675 this._updateSummaryBar(); |
| 676 | |
| 677 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.DataRef reshed); | |
| 674 }, | 678 }, |
| 675 | 679 |
| 676 reset: function() | 680 reset: function() |
| 677 { | 681 { |
| 678 this._requestWithHighlightedInitiators = null; | 682 this._requestWithHighlightedInitiators = null; |
| 679 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request Selected, null); | 683 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request Selected, null); |
| 680 | 684 |
| 681 this._clearSearchMatchedList(); | 685 this._clearSearchMatchedList(); |
| 682 | 686 |
| 683 this._columns.reset(); | 687 this._columns.reset(); |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1118 }, | 1122 }, |
| 1119 | 1123 |
| 1120 dataGridSorted: function() | 1124 dataGridSorted: function() |
| 1121 { | 1125 { |
| 1122 this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindM atchIndex(this._currentMatchedRequestNode), false); | 1126 this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindM atchIndex(this._currentMatchedRequestNode), false); |
| 1123 | 1127 |
| 1124 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline")) | 1128 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline")) |
| 1125 return; | 1129 return; |
| 1126 | 1130 |
| 1127 this._timelineColumnSortIcon.classList.remove("sort-ascending", "sort-de scending"); | 1131 this._timelineColumnSortIcon.classList.remove("sort-ascending", "sort-de scending"); |
| 1128 if (this._dataGrid.sortColumnIdentifier() !== "timeline") | |
| 1129 return; | |
| 1130 | 1132 |
| 1131 if (this._dataGrid.sortOrder() === WebInspector.DataGrid.Order.Ascending ) | 1133 if (this._dataGrid.sortColumnIdentifier() === "timeline") { |
| 1132 this._timelineColumnSortIcon.classList.add("sort-ascending"); | 1134 if (this._dataGrid.sortOrder() === WebInspector.DataGrid.Order.Ascen ding) |
| 1133 else | 1135 this._timelineColumnSortIcon.classList.add("sort-ascending"); |
| 1134 this._timelineColumnSortIcon.classList.add("sort-descending"); | 1136 else |
| 1137 this._timelineColumnSortIcon.classList.add("sort-descending"); | |
| 1138 } | |
| 1139 | |
| 1140 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request sSorted); | |
| 1135 }, | 1141 }, |
| 1136 | 1142 |
| 1137 /** | 1143 /** |
| 1138 * @param {number} n | 1144 * @param {number} n |
| 1139 * @param {boolean} reveal | 1145 * @param {boolean} reveal |
| 1140 */ | 1146 */ |
| 1141 _highlightNthMatchedRequestForSearch: function(n, reveal) | 1147 _highlightNthMatchedRequestForSearch: function(n, reveal) |
| 1142 { | 1148 { |
| 1143 this._removeAllHighlights(); | 1149 this._removeAllHighlights(); |
| 1144 | 1150 |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1813 * @return {boolean} | 1819 * @return {boolean} |
| 1814 */ | 1820 */ |
| 1815 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request) | 1821 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request) |
| 1816 { | 1822 { |
| 1817 if (request.issueTime() > windowEnd) | 1823 if (request.issueTime() > windowEnd) |
| 1818 return false; | 1824 return false; |
| 1819 if (request.endTime !== -1 && request.endTime < windowStart) | 1825 if (request.endTime !== -1 && request.endTime < windowStart) |
| 1820 return false; | 1826 return false; |
| 1821 return true; | 1827 return true; |
| 1822 } | 1828 } |
| OLD | NEW |