OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 * @this {WebInspector.AuditController} | 71 * @this {WebInspector.AuditController} |
72 */ | 72 */ |
73 function categoryDoneCallback() | 73 function categoryDoneCallback() |
74 { | 74 { |
75 if (++categoriesDone !== categories.length) | 75 if (++categoriesDone !== categories.length) |
76 return; | 76 return; |
77 this._progress.done(); | 77 this._progress.done(); |
78 resultCallback(mainResourceURL, results); | 78 resultCallback(mainResourceURL, results); |
79 } | 79 } |
80 | 80 |
81 var requests = target.networkLog.requests.slice(); | 81 var requests = target.networkLog.requests().slice(); |
82 var compositeProgress = new WebInspector.CompositeProgress(this._progres
s); | 82 var compositeProgress = new WebInspector.CompositeProgress(this._progres
s); |
83 var subprogresses = []; | 83 var subprogresses = []; |
84 for (var i = 0; i < categories.length; ++i) | 84 for (var i = 0; i < categories.length; ++i) |
85 subprogresses.push(compositeProgress.createSubProgress()); | 85 subprogresses.push(compositeProgress.createSubProgress()); |
86 for (var i = 0; i < categories.length; ++i) { | 86 for (var i = 0; i < categories.length; ++i) { |
87 var category = categories[i]; | 87 var category = categories[i]; |
88 var result = new WebInspector.AuditCategoryResult(category); | 88 var result = new WebInspector.AuditCategoryResult(category); |
89 results.push(result); | 89 results.push(result); |
90 category.run(target, requests, ruleResultReadyCallback.bind(this, re
sult), categoryDoneCallback.bind(this), subprogresses[i]); | 90 category.run(target, requests, ruleResultReadyCallback.bind(this, re
sult), categoryDoneCallback.bind(this), subprogresses[i]); |
91 } | 91 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 delete this._pageReloadCallback; | 155 delete this._pageReloadCallback; |
156 callback(); | 156 callback(); |
157 } | 157 } |
158 }, | 158 }, |
159 | 159 |
160 clearResults: function() | 160 clearResults: function() |
161 { | 161 { |
162 this._auditsPanel.clearResults(); | 162 this._auditsPanel.clearResults(); |
163 } | 163 } |
164 } | 164 } |
OLD | NEW |