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

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

Issue 2460073002: [Devtools] Move canvas timeline out of experiments and remove old code (Closed)
Patch Set: changes Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 * @param {number} end 389 * @param {number} end
390 */ 390 */
391 setWindow(start, end) { 391 setWindow(start, end) {
392 if (!start && !end) { 392 if (!start && !end) {
393 this._timeFilter = null; 393 this._timeFilter = null;
394 this._timeCalculator.setWindow(null); 394 this._timeCalculator.setWindow(null);
395 } else { 395 } else {
396 this._timeFilter = WebInspector.NetworkLogView._requestTimeFilter.bind(nul l, start, end); 396 this._timeFilter = WebInspector.NetworkLogView._requestTimeFilter.bind(nul l, start, end);
397 this._timeCalculator.setWindow(new WebInspector.NetworkTimeBoundary(start, end)); 397 this._timeCalculator.setWindow(new WebInspector.NetworkTimeBoundary(start, end));
398 } 398 }
399 this._columns.updateDividersIfNeeded();
400 this._filterRequests(); 399 this._filterRequests();
401 } 400 }
402 401
403 clearSelection() { 402 clearSelection() {
404 if (this._dataGrid.selectedNode) 403 if (this._dataGrid.selectedNode)
405 this._dataGrid.selectedNode.deselect(); 404 this._dataGrid.selectedNode.deselect();
406 } 405 }
407 406
408 _addFilters() { 407 _addFilters() {
409 this._textFilterUI = new WebInspector.TextFilterUI(true); 408 this._textFilterUI = new WebInspector.TextFilterUI(true);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 } 758 }
760 759
761 /** 760 /**
762 * @override 761 * @override
763 */ 762 */
764 wasShown() { 763 wasShown() {
765 this._refreshIfNeeded(); 764 this._refreshIfNeeded();
766 this._columns.wasShown(); 765 this._columns.wasShown();
767 } 766 }
768 767
769 /**
770 * @override
771 */
772 willHide() {
773 this._columns.willHide();
774 }
775
776 _refresh() { 768 _refresh() {
777 this._needsRefresh = false; 769 this._needsRefresh = false;
778 770
779 if (this._refreshRequestId) { 771 if (this._refreshRequestId) {
780 this.element.window().cancelAnimationFrame(this._refreshRequestId); 772 this.element.window().cancelAnimationFrame(this._refreshRequestId);
781 delete this._refreshRequestId; 773 delete this._refreshRequestId;
782 } 774 }
783 775
784 this.removeAllNodeHighlights(); 776 this.removeAllNodeHighlights();
785 777
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 dataGrid.insertChild(node); 816 dataGrid.insertChild(node);
825 node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = this._mat chRequest(request); 817 node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = this._mat chRequest(request);
826 } 818 }
827 819
828 for (var node of nodesToRefresh) 820 for (var node of nodesToRefresh)
829 node.refresh(); 821 node.refresh();
830 822
831 this._highlightNthMatchedRequestForSearch( 823 this._highlightNthMatchedRequestForSearch(
832 this._updateMatchCountAndFindMatchIndex(this._currentMatchedRequestNode) , false); 824 this._updateMatchCountAndFindMatchIndex(this._currentMatchedRequestNode) , false);
833 825
834 if (!this.calculator().boundary().equals(oldBoundary)) {
835 // The boundaries changed, so all item graphs are stale.
836 this._columns.updateDividersIfNeeded();
837 var nodes = this._nodesByRequestId.valuesArray();
838 for (var i = 0; i < nodes.length; ++i)
839 nodes[i].refreshGraph();
840 }
841
842 this._staleRequestIds = {}; 826 this._staleRequestIds = {};
843 this._updateSummaryBar(); 827 this._updateSummaryBar();
844 828
845 this._columns.dataChanged(); 829 this._columns.dataChanged();
846 } 830 }
847 831
848 reset() { 832 reset() {
849 this._requestWithHighlightedInitiators = null; 833 this._requestWithHighlightedInitiators = null;
850 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.RequestSele cted, null); 834 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.RequestSele cted, null);
851 835
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 WebInspector.NetworkLogView.IsFilterType = { 1697 WebInspector.NetworkLogView.IsFilterType = {
1714 Running: 'running' 1698 Running: 'running'
1715 }; 1699 };
1716 1700
1717 /** @type {!Array<string>} */ 1701 /** @type {!Array<string>} */
1718 WebInspector.NetworkLogView._searchKeys = 1702 WebInspector.NetworkLogView._searchKeys =
1719 Object.keys(WebInspector.NetworkLogView.FilterType).map(key => WebInspector. NetworkLogView.FilterType[key]); 1703 Object.keys(WebInspector.NetworkLogView.FilterType).map(key => WebInspector. NetworkLogView.FilterType[key]);
1720 1704
1721 /** @typedef {function(!WebInspector.NetworkRequest): boolean} */ 1705 /** @typedef {function(!WebInspector.NetworkRequest): boolean} */
1722 WebInspector.NetworkLogView.Filter; 1706 WebInspector.NetworkLogView.Filter;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698