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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js

Issue 2788793002: [Devtools] Added frame grouping to network panel (Closed)
Patch Set: changes 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network_group_lookup/module.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 * @param {!Protocol.Runtime.StackTrace=} stackTrace 155 * @param {!Protocol.Runtime.StackTrace=} stackTrace
156 * @return {?SDK.ResourceTreeFrame} 156 * @return {?SDK.ResourceTreeFrame}
157 */ 157 */
158 _frameAttached(frameId, parentFrameId, stackTrace) { 158 _frameAttached(frameId, parentFrameId, stackTrace) {
159 // Do nothing unless cached resource tree is processed - it will overwrite e verything. 159 // Do nothing unless cached resource tree is processed - it will overwrite e verything.
160 if (!this._cachedResourcesProcessed && parentFrameId) 160 if (!this._cachedResourcesProcessed && parentFrameId)
161 return null; 161 return null;
162 if (this._frames.has(frameId)) 162 if (this._frames.has(frameId))
163 return null; 163 return null;
164 164
165 var callFrames = null;
166 if (stackTrace && stackTrace.callFrames)
167 callFrames = stackTrace.callFrames;
168
169 var parentFrame = parentFrameId ? (this._frames.get(parentFrameId) || null) : null; 165 var parentFrame = parentFrameId ? (this._frames.get(parentFrameId) || null) : null;
170 var frame = new SDK.ResourceTreeFrame(this, parentFrame, frameId, null, call Frames); 166 var frame = new SDK.ResourceTreeFrame(this, parentFrame, frameId, null, stac kTrace || null);
171 if (frame.isMainFrame() && this.mainFrame) { 167 if (frame.isMainFrame() && this.mainFrame) {
172 // Navigation to the new backend process. 168 // Navigation to the new backend process.
173 this._frameDetached(this.mainFrame.id); 169 this._frameDetached(this.mainFrame.id);
174 } 170 }
175 this._addFrame(frame, true); 171 this._addFrame(frame, true);
176 return frame; 172 return frame;
177 } 173 }
178 174
179 /** 175 /**
180 * @param {!Protocol.Page.Frame} framePayload 176 * @param {!Protocol.Page.Frame} framePayload
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 482
487 /** 483 /**
488 * @unrestricted 484 * @unrestricted
489 */ 485 */
490 SDK.ResourceTreeFrame = class { 486 SDK.ResourceTreeFrame = class {
491 /** 487 /**
492 * @param {!SDK.ResourceTreeModel} model 488 * @param {!SDK.ResourceTreeModel} model
493 * @param {?SDK.ResourceTreeFrame} parentFrame 489 * @param {?SDK.ResourceTreeFrame} parentFrame
494 * @param {!Protocol.Page.FrameId} frameId 490 * @param {!Protocol.Page.FrameId} frameId
495 * @param {?Protocol.Page.Frame} payload 491 * @param {?Protocol.Page.Frame} payload
496 * @param {?Array<!Protocol.Runtime.CallFrame>} creationStackTrace 492 * @param {?Protocol.Runtime.StackTrace} creationStackTrace
497 */ 493 */
498 constructor(model, parentFrame, frameId, payload, creationStackTrace) { 494 constructor(model, parentFrame, frameId, payload, creationStackTrace) {
499 this._model = model; 495 this._model = model;
500 this._parentFrame = parentFrame; 496 this._parentFrame = parentFrame;
501 this._id = frameId; 497 this._id = frameId;
502 this._url = ''; 498 this._url = '';
503 499
504 if (payload) { 500 if (payload) {
505 this._loaderId = payload.loaderId; 501 this._loaderId = payload.loaderId;
506 this._name = payload.name; 502 this._name = payload.name;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 571 }
576 572
577 /** 573 /**
578 * @return {!Array.<!SDK.ResourceTreeFrame>} 574 * @return {!Array.<!SDK.ResourceTreeFrame>}
579 */ 575 */
580 get childFrames() { 576 get childFrames() {
581 return this._childFrames; 577 return this._childFrames;
582 } 578 }
583 579
584 /** 580 /**
581 * @return {?Protocol.Runtime.StackTrace}
582 */
583 creationStackTrace() {
584 return this._creationStackTrace;
585 }
586
587 /**
585 * @return {boolean} 588 * @return {boolean}
586 */ 589 */
587 isMainFrame() { 590 isMainFrame() {
588 return !this._parentFrame; 591 return !this._parentFrame;
589 } 592 }
590 593
591 /** 594 /**
592 * @param {!Protocol.Page.Frame} framePayload 595 * @param {!Protocol.Page.Frame} framePayload
593 */ 596 */
594 _navigate(framePayload) { 597 _navigate(framePayload) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden); 868 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden);
866 } 869 }
867 870
868 /** 871 /**
869 * @override 872 * @override
870 */ 873 */
871 navigationRequested() { 874 navigationRequested() {
872 // Frontend is not interested in when navigations are requested. 875 // Frontend is not interested in when navigations are requested.
873 } 876 }
874 }; 877 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network_group_lookup/module.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698