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

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: canges 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 self.runtime.allInstances(Network.NetworkRowDecorator).then(instances => {
502 for (var instance of instances)
503 this._rowDecorators.add(instance);
504 this._invalidateAllItems(true);
505 });
506
491 this._columns.show(this.element); 507 this._columns.show(this.element);
492 508
493 this._summaryBarElement = this.element.createChild('div', 'network-summary-b ar'); 509 this._summaryBarElement = this.element.createChild('div', 'network-summary-b ar');
494 510
495 this._columns.sortByCurrentColumn(); 511 this._columns.sortByCurrentColumn();
496 } 512 }
497 513
498 _showRecordingHint() { 514 _showRecordingHint() {
499 this._hideRecordingHint(); 515 this._hideRecordingHint();
500 this._recordingHint = this.element.createChild('div', 'network-status-pane f ill'); 516 this._recordingHint = this.element.createChild('div', 'network-status-pane f ill');
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 * @return {?*} 1827 * @return {?*}
1812 */ 1828 */
1813 groupForRequest(request) {}, 1829 groupForRequest(request) {},
1814 1830
1815 /** 1831 /**
1816 * @param {!*} key 1832 * @param {!*} key
1817 * @return {string} 1833 * @return {string}
1818 */ 1834 */
1819 groupName(key) {} 1835 groupName(key) {}
1820 }; 1836 };
1837
1838 /**
1839 * @interface
1840 */
1841 Network.NetworkRowDecorator = function() {};
1842
1843 Network.NetworkRowDecorator.prototype = {
1844 /**
1845 * @param {!Network.NetworkNode} node
1846 */
1847 decorate(node) {}
1848 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698