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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 /** | 32 /** |
33 * @constructor | 33 * @constructor |
34 * @param {!WebInspector.AuditsPanel} auditsPanel | 34 * @param {!WebInspector.AuditsPanel} auditsPanel |
35 */ | 35 */ |
36 WebInspector.AuditController = function(auditsPanel) | 36 WebInspector.AuditController = function(auditsPanel) |
37 { | 37 { |
38 this._auditsPanel = auditsPanel; | 38 this._auditsPanel = auditsPanel; |
39 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.Load, this._didMainResourceLoad, this); | 39 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.Load, this._didMainResourceLoad, this); |
40 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestFinished, this._didLoadResource, this); | 40 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestFinished, this._didLoadResource, this); |
41 } | 41 }; |
42 | 42 |
43 WebInspector.AuditController.prototype = { | 43 WebInspector.AuditController.prototype = { |
44 /** | 44 /** |
45 * @param {!WebInspector.Target} target | 45 * @param {!WebInspector.Target} target |
46 * @param {!Array.<!WebInspector.AuditCategory>} categories | 46 * @param {!Array.<!WebInspector.AuditCategory>} categories |
47 * @param {function(string, !Array.<!WebInspector.AuditCategoryResult>)} res
ultCallback | 47 * @param {function(string, !Array.<!WebInspector.AuditCategoryResult>)} res
ultCallback |
48 */ | 48 */ |
49 _executeAudit: function(target, categories, resultCallback) | 49 _executeAudit: function(target, categories, resultCallback) |
50 { | 50 { |
51 this._progress.setTitle(WebInspector.UIString("Running audit")); | 51 this._progress.setTitle(WebInspector.UIString("Running audit")); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 var callback = this._pageReloadCallback; | 162 var callback = this._pageReloadCallback; |
163 delete this._pageReloadCallback; | 163 delete this._pageReloadCallback; |
164 callback(); | 164 callback(); |
165 } | 165 } |
166 }, | 166 }, |
167 | 167 |
168 clearResults: function() | 168 clearResults: function() |
169 { | 169 { |
170 this._auditsPanel.clearResults(); | 170 this._auditsPanel.clearResults(); |
171 } | 171 } |
172 } | 172 }; |
OLD | NEW |