OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 WebInspector.CPUProfileView = function(profileHeader) | 32 WebInspector.CPUProfileView = function(profileHeader) |
33 { | 33 { |
34 this._profileHeader = profileHeader; | 34 this._profileHeader = profileHeader; |
35 this.profile = new WebInspector.CPUProfileDataModel(profileHeader._profile |
| profileHeader.protocolProfile()); | 35 this.profile = new WebInspector.CPUProfileDataModel(profileHeader._profile |
| profileHeader.protocolProfile()); |
36 this.adjustedTotal = this.profile.profileHead.total; | 36 this.adjustedTotal = this.profile.profileHead.total; |
37 this.adjustedTotal -= this.profile.idleNode ? this.profile.idleNode.total :
0; | 37 this.adjustedTotal -= this.profile.idleNode ? this.profile.idleNode.total :
0; |
38 WebInspector.ProfileView.call(this, new WebInspector.CPUProfileView.NodeForm
atter(this)); | 38 WebInspector.ProfileView.call(this, new WebInspector.CPUProfileView.NodeForm
atter(this)); |
39 } | 39 } |
40 | 40 |
41 WebInspector.CPUProfileView.prototype = { | 41 WebInspector.CPUProfileView.prototype = { |
| 42 /** |
| 43 * @override |
| 44 * @param {string} columnId |
| 45 * @return {string} |
| 46 */ |
| 47 columnHeader: function(columnId) |
| 48 { |
| 49 switch (columnId) { |
| 50 case "self": return WebInspector.UIString("Self Time"); |
| 51 case "total": return WebInspector.UIString("Total Time"); |
| 52 } |
| 53 return ""; |
| 54 }, |
| 55 |
42 __proto__: WebInspector.ProfileView.prototype | 56 __proto__: WebInspector.ProfileView.prototype |
43 } | 57 } |
44 | 58 |
45 /** | 59 /** |
46 * @constructor | 60 * @constructor |
47 * @extends {WebInspector.ProfileType} | 61 * @extends {WebInspector.ProfileType} |
48 */ | 62 */ |
49 WebInspector.CPUProfileType = function() | 63 WebInspector.CPUProfileType = function() |
50 { | 64 { |
51 WebInspector.ProfileType.call(this, WebInspector.CPUProfileType.TypeId, WebI
nspector.UIString("Collect JavaScript CPU Profile")); | 65 WebInspector.ProfileType.call(this, WebInspector.CPUProfileType.TypeId, WebI
nspector.UIString("Collect JavaScript CPU Profile")); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 * @override | 326 * @override |
313 * @param {!WebInspector.ProfileDataGridNode} node | 327 * @param {!WebInspector.ProfileDataGridNode} node |
314 * @return {!Element} | 328 * @return {!Element} |
315 */ | 329 */ |
316 linkifyNode: function(node) | 330 linkifyNode: function(node) |
317 { | 331 { |
318 var callFrame = node.profileNode.frame; | 332 var callFrame = node.profileNode.frame; |
319 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi
leView.target(), callFrame, "profile-node-file"); | 333 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi
leView.target(), callFrame, "profile-node-file"); |
320 } | 334 } |
321 } | 335 } |
OLD | NEW |