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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
index 202a35f3f175b761b8c411b058292a8f72e99f2d..e9f7dbcf5c9c3126341a721eb08a8faf013e500f 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
@@ -34,9 +34,9 @@
*/
WebInspector.resourceForURL = function(url)
{
- var targets = WebInspector.targetManager.targets();
+ var targets = WebInspector.targetManager.targets(WebInspector.Target.Capability.DOM);
for (var i = 0; i < targets.length; ++i) {
- var resource = targets[i].resourceTreeModel.resourceForURL(url);
+ var resource = WebInspector.ResourceTreeModel.fromTarget(targets[i]).resourceForURL(url);
if (resource)
return resource;
}
@@ -48,9 +48,9 @@ WebInspector.resourceForURL = function(url)
*/
WebInspector.forAllResources = function(callback)
{
- var targets = WebInspector.targetManager.targets();
+ var targets = WebInspector.targetManager.targets(WebInspector.Target.Capability.DOM);
for (var i = 0; i < targets.length; ++i)
- targets[i].resourceTreeModel.forAllResources(callback);
+ WebInspector.ResourceTreeModel.fromTarget(targets[i]).forAllResources(callback);
}
/**

Powered by Google App Engine
This is Rietveld 408576698