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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/tracing/timeline-auto-record.html ('k') | Source/devtools/front_end/bindings/SASSSourceMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698