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

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

Issue 2921963002: [Devtools] Removed NetworkRequest dependency on NetworkManager (Closed)
Patch Set: Merge branch 'REMOVE_REDIRECTS_REBASE' into REMOVE_MANAGER_DEPENDENCY Created 3 years, 6 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/sdk/NetworkRequest.js ('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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 this.mainFrame = null; 57 this.mainFrame = null;
58 58
59 this._agent.getResourceTree().then(this._processCachedResources.bind(this)); 59 this._agent.getResourceTree().then(this._processCachedResources.bind(this));
60 } 60 }
61 61
62 /** 62 /**
63 * @param {!SDK.NetworkRequest} request 63 * @param {!SDK.NetworkRequest} request
64 * @return {?SDK.ResourceTreeFrame} 64 * @return {?SDK.ResourceTreeFrame}
65 */ 65 */
66 static frameForRequest(request) { 66 static frameForRequest(request) {
67 var resourceTreeModel = request.networkManager().target().model(SDK.Resource TreeModel); 67 var networkManager = SDK.NetworkManager.forRequest(request);
68 var resourceTreeModel = networkManager ? networkManager.target().model(SDK.R esourceTreeModel) : null;
68 if (!resourceTreeModel) 69 if (!resourceTreeModel)
69 return null; 70 return null;
70 return resourceTreeModel.frameForId(request.frameId); 71 return resourceTreeModel.frameForId(request.frameId);
71 } 72 }
72 73
73 /** 74 /**
74 * @return {!Array.<!SDK.ResourceTreeFrame>} 75 * @return {!Array.<!SDK.ResourceTreeFrame>}
75 */ 76 */
76 static frames() { 77 static frames() {
77 var result = []; 78 var result = [];
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden); 878 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden);
878 } 879 }
879 880
880 /** 881 /**
881 * @override 882 * @override
882 */ 883 */
883 navigationRequested() { 884 navigationRequested() {
884 // Frontend is not interested in when navigations are requested. 885 // Frontend is not interested in when navigations are requested.
885 } 886 }
886 }; 887 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698