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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 Network.NetworkRequestNode = class extends Network.NetworkNode { | 354 Network.NetworkRequestNode = class extends Network.NetworkNode { |
355 /** | 355 /** |
356 * @param {!Network.NetworkLogView} parentView | 356 * @param {!Network.NetworkLogView} parentView |
357 * @param {!SDK.NetworkRequest} request | 357 * @param {!SDK.NetworkRequest} request |
358 */ | 358 */ |
359 constructor(parentView, request) { | 359 constructor(parentView, request) { |
360 super(parentView); | 360 super(parentView); |
361 /** @type {?Element} */ | 361 /** @type {?Element} */ |
362 this._nameCell = null; | 362 this._nameCell = null; |
363 /** @type {?Element} */ | 363 /** @type {?Element} */ |
| 364 this._nameBadgeElement = null; |
| 365 /** @type {?Element} */ |
364 this._initiatorCell = null; | 366 this._initiatorCell = null; |
365 /** @type {?Element} */ | |
366 this._linkifiedInitiatorAnchor = null; | |
367 this._request = request; | 367 this._request = request; |
368 this._isNavigationRequest = false; | 368 this._isNavigationRequest = false; |
369 this.selectable = true; | 369 this.selectable = true; |
370 this._isOnInitiatorPath = false; | 370 this._isOnInitiatorPath = false; |
371 this._isOnInitiatedPath = false; | 371 this._isOnInitiatedPath = false; |
372 this._isFromFrame = false; | 372 this._isFromFrame = false; |
373 if (!Runtime.experiments.isEnabled('networkGroupingRequests')) | 373 if (!Runtime.experiments.isEnabled('networkGroupingRequests')) |
374 return; | 374 return; |
375 var frame = SDK.ResourceTreeModel.frameForRequest(request); | 375 var frame = SDK.ResourceTreeModel.frameForRequest(request); |
376 this._isFromFrame = frame ? !frame.isMainFrame() : false; | 376 this._isFromFrame = frame ? !frame.isMainFrame() : false; |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 this._request.populateImageSource(previewImage); | 926 this._request.populateImageSource(previewImage); |
927 | 927 |
928 iconElement = createElementWithClass('div', 'icon'); | 928 iconElement = createElementWithClass('div', 'icon'); |
929 iconElement.appendChild(previewImage); | 929 iconElement.appendChild(previewImage); |
930 } else { | 930 } else { |
931 iconElement = createElementWithClass('img', 'icon'); | 931 iconElement = createElementWithClass('img', 'icon'); |
932 } | 932 } |
933 iconElement.classList.add(this._request.resourceType().name()); | 933 iconElement.classList.add(this._request.resourceType().name()); |
934 | 934 |
935 cell.appendChild(iconElement); | 935 cell.appendChild(iconElement); |
| 936 if (!this._nameBadgeElement) |
| 937 this._nameBadgeElement = this.parentView().badgePool.badgeForURL(this._req
uest.parsedURL); |
| 938 cell.appendChild(this._nameBadgeElement); |
936 cell.createTextChild(this._request.networkManager().target().decorateLabel(t
his._request.name())); | 939 cell.createTextChild(this._request.networkManager().target().decorateLabel(t
his._request.name())); |
937 this._appendSubtitle(cell, this._request.path()); | 940 this._appendSubtitle(cell, this._request.path()); |
938 cell.title = this._request.url(); | 941 cell.title = this._request.url(); |
939 } | 942 } |
940 | 943 |
941 /** | 944 /** |
942 * @override | 945 * @override |
943 * @return {!Promise<?Network.NetworkNode._ProductEntryInfo>} | 946 * @return {!Promise<?Network.NetworkNode._ProductEntryInfo>} |
944 */ | 947 */ |
945 productEntry() { | 948 productEntry() { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 * @param {boolean=} supressSelectedEvent | 1132 * @param {boolean=} supressSelectedEvent |
1130 */ | 1133 */ |
1131 select(supressSelectedEvent) { | 1134 select(supressSelectedEvent) { |
1132 if (this.expanded) { | 1135 if (this.expanded) { |
1133 this.collapse(); | 1136 this.collapse(); |
1134 return; | 1137 return; |
1135 } | 1138 } |
1136 this.expand(); | 1139 this.expand(); |
1137 } | 1140 } |
1138 }; | 1141 }; |
OLD | NEW |