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

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

Issue 2807823002: [Devtools] Updated format to store product registry data (Closed)
Patch Set: [Devtools] Updated format to store product registry data Created 3 years, 8 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 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 updateRowHeight.call(this); 70 updateRowHeight.call(this);
71 71
72 this._columns = new Network.NetworkLogViewColumns( 72 this._columns = new Network.NetworkLogViewColumns(
73 this, this._timeCalculator, this._durationCalculator, networkLogLargeRow sSetting); 73 this, this._timeCalculator, this._durationCalculator, networkLogLargeRow sSetting);
74 74
75 /** @type {!Map.<string, !Network.NetworkRequestNode>} */ 75 /** @type {!Map.<string, !Network.NetworkRequestNode>} */
76 this._nodesByRequestId = new Map(); 76 this._nodesByRequestId = new Map();
77 /** @type {!Map<*, !Network.NetworkGroupNode>} */ 77 /** @type {!Map<*, !Network.NetworkGroupNode>} */
78 this._nodeGroups = new Map(); 78 this._nodeGroups = new Map();
79 /** @type {!Set<!Network.NetworkRowDecorator>} */
80 this._rowDecorators = new Set();
81
79 /** @type {!Object.<string, boolean>} */ 82 /** @type {!Object.<string, boolean>} */
80 this._staleRequestIds = {}; 83 this._staleRequestIds = {};
81 /** @type {number} */ 84 /** @type {number} */
82 this._mainRequestLoadTime = -1; 85 this._mainRequestLoadTime = -1;
83 /** @type {number} */ 86 /** @type {number} */
84 this._mainRequestDOMContentLoadedTime = -1; 87 this._mainRequestDOMContentLoadedTime = -1;
85 this._matchedRequestCount = 0; 88 this._matchedRequestCount = 0;
86 this._highlightedSubstringChanges = []; 89 this._highlightedSubstringChanges = [];
87 90
88 /** @type {!Array.<!Network.NetworkLogView.Filter>} */ 91 /** @type {!Array.<!Network.NetworkLogView.Filter>} */
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 /** 354 /**
352 * @param {?Network.NetworkGroupLookupInterface} grouping 355 * @param {?Network.NetworkGroupLookupInterface} grouping
353 */ 356 */
354 setGrouping(grouping) { 357 setGrouping(grouping) {
355 this._activeGroupLookup = grouping; 358 this._activeGroupLookup = grouping;
356 this._nodeGroups.clear(); 359 this._nodeGroups.clear();
357 this._invalidateAllItems(); 360 this._invalidateAllItems();
358 } 361 }
359 362
360 /** 363 /**
364 * @return {!Set<!Network.NetworkRowDecorator>}
365 */
366 rowDecorators() {
367 return this._rowDecorators;
368 }
369
370 /**
361 * @param {!SDK.NetworkRequest} request 371 * @param {!SDK.NetworkRequest} request
362 * @return {?Network.NetworkRequestNode} 372 * @return {?Network.NetworkRequestNode}
363 */ 373 */
364 nodeForRequest(request) { 374 nodeForRequest(request) {
365 return this._nodesByRequestId.get(request.requestId()); 375 return this._nodesByRequestId.get(request.requestId());
366 } 376 }
367 377
368 /** 378 /**
369 * @return {number} 379 * @return {number}
370 */ 380 */
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 _filterChanged(event) { 491 _filterChanged(event) {
482 this.removeAllNodeHighlights(); 492 this.removeAllNodeHighlights();
483 this._parseFilterQuery(this._textFilterUI.value()); 493 this._parseFilterQuery(this._textFilterUI.value());
484 this._filterRequests(); 494 this._filterRequests();
485 } 495 }
486 496
487 _initializeView() { 497 _initializeView() {
488 this.element.id = 'network-container'; 498 this.element.id = 'network-container';
489 this._setupDataGrid(); 499 this._setupDataGrid();
490 500
501 var extensions = self.runtime.extensions(Network.NetworkRowDecorator);
502 for (var extension of extensions) {
503 extension.instance().then(instance => {
504 instance.setDataGrid(this._dataGrid);
505 this._rowDecorators.add(instance);
506 this._invalidateAllItems(true);
pfeldman 2017/04/11 00:07:31 I was suggesting to put a barrier to coalesce thos
allada 2017/04/12 00:53:47 Done.
507 });
508 }
509
491 this._columns.show(this.element); 510 this._columns.show(this.element);
492 511
493 this._summaryBarElement = this.element.createChild('div', 'network-summary-b ar'); 512 this._summaryBarElement = this.element.createChild('div', 'network-summary-b ar');
494 513
495 this._columns.sortByCurrentColumn(); 514 this._columns.sortByCurrentColumn();
496 } 515 }
497 516
498 _showRecordingHint() { 517 _showRecordingHint() {
499 this._hideRecordingHint(); 518 this._hideRecordingHint();
500 this._recordingHint = this.element.createChild('div', 'network-status-pane f ill'); 519 this._recordingHint = this.element.createChild('div', 'network-status-pane f ill');
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 * @return {?*} 1828 * @return {?*}
1810 */ 1829 */
1811 groupForRequest(request) {}, 1830 groupForRequest(request) {},
1812 1831
1813 /** 1832 /**
1814 * @param {!*} key 1833 * @param {!*} key
1815 * @return {string} 1834 * @return {string}
1816 */ 1835 */
1817 groupName(key) {} 1836 groupName(key) {}
1818 }; 1837 };
1838
1839 /**
1840 * @interface
1841 */
1842 Network.NetworkRowDecorator = function() {};
1843
1844 Network.NetworkRowDecorator.prototype = {
1845 /**
1846 * @param {!DataGrid.SortableDataGrid<!Network.NetworkNode>} dataGrid
1847 */
1848 setDataGrid(dataGrid) {},
1849
1850 /**
1851 * @param {!Network.NetworkNode} node
1852 */
1853 decorate(node) {}
1854 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698