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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/audits/AuditController.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 * @param {!WebInspector.AuditCategoryResult} categoryResult 54 * @param {!WebInspector.AuditCategoryResult} categoryResult
55 * @param {!WebInspector.AuditRuleResult} ruleResult 55 * @param {!WebInspector.AuditRuleResult} ruleResult
56 */ 56 */
57 function ruleResultReadyCallback(categoryResult, ruleResult) 57 function ruleResultReadyCallback(categoryResult, ruleResult)
58 { 58 {
59 if (ruleResult && ruleResult.children) 59 if (ruleResult && ruleResult.children)
60 categoryResult.addRuleResult(ruleResult); 60 categoryResult.addRuleResult(ruleResult);
61 } 61 }
62 62
63 var results = []; 63 var results = [];
64 var mainResourceURL = target.resourceTreeModel.inspectedPageURL(); 64 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target );
65 var mainResourceURL = resourceTreeModel ? resourceTreeModel.inspectedPag eURL() : "main";
pfeldman 2016/07/13 23:55:57 s/"main"/""/
eostroukhov-old 2016/07/20 23:46:14 Done.
65 var categoriesDone = 0; 66 var categoriesDone = 0;
66 67
67 function categoryDoneCallback() 68 function categoryDoneCallback()
68 { 69 {
69 if (++categoriesDone !== categories.length) 70 if (++categoriesDone !== categories.length)
70 return; 71 return;
71 resultCallback(mainResourceURL, results); 72 resultCallback(mainResourceURL, results);
72 } 73 }
73 74
74 var networkLog = WebInspector.NetworkLog.fromTarget(target); 75 var networkLog = WebInspector.NetworkLog.fromTarget(target);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 delete this._pageReloadCallback; 164 delete this._pageReloadCallback;
164 callback(); 165 callback();
165 } 166 }
166 }, 167 },
167 168
168 clearResults: function() 169 clearResults: function()
169 { 170 {
170 this._auditsPanel.clearResults(); 171 this._auditsPanel.clearResults();
171 } 172 }
172 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698