| 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) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 rightTime = Math.min(rightTime + 0.05 * span, this._tracingModel.max
imumRecordTime()); | 1262 rightTime = Math.min(rightTime + 0.05 * span, this._tracingModel.max
imumRecordTime()); |
| 1263 } | 1263 } |
| 1264 this.requestWindowTimes(leftTime, rightTime); | 1264 this.requestWindowTimes(leftTime, rightTime); |
| 1265 }, | 1265 }, |
| 1266 | 1266 |
| 1267 /** | 1267 /** |
| 1268 * @param {!WebInspector.TimelineModel.LineLevelProfile} profile | 1268 * @param {!WebInspector.TimelineModel.LineLevelProfile} profile |
| 1269 */ | 1269 */ |
| 1270 _setLineLevelCPUProfile: function(profile) | 1270 _setLineLevelCPUProfile: function(profile) |
| 1271 { | 1271 { |
| 1272 var debuggerModel = WebInspector.DebuggerModel.fromTarget(WebInspector.t
argetManager.mainTarget()); |
| 1273 if (!debuggerModel) |
| 1274 return; |
| 1272 for (var fileInfo of profile.files()) { | 1275 for (var fileInfo of profile.files()) { |
| 1273 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(/** @ty
pe {string} */ (fileInfo[0])); | 1276 var url = /** @type {string} */ (fileInfo[0]); |
| 1274 if (!uiSourceCode) | 1277 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(url); |
| 1275 continue; | |
| 1276 for (var lineInfo of fileInfo[1]) { | 1278 for (var lineInfo of fileInfo[1]) { |
| 1277 var line = lineInfo[0]; | 1279 var line = lineInfo[0] - 1; |
| 1278 var time = lineInfo[1]; | 1280 var time = lineInfo[1]; |
| 1279 uiSourceCode.addLineDecoration(line, WebInspector.TimelineUIUtil
s.PerformanceLineDecorator.type, time); | 1281 var rawLocation = debuggerModel.createRawLocationByURL(url, line
, 0); |
| 1282 if (rawLocation) |
| 1283 new WebInspector.TimelineUIUtils.LineLevelProfilePresentatio
n(rawLocation, time); |
| 1284 else if (uiSourceCode) |
| 1285 uiSourceCode.addLineDecoration(line, WebInspector.TimelineUI
Utils.PerformanceLineDecorator.type, time); |
| 1280 } | 1286 } |
| 1281 } | 1287 } |
| 1282 }, | 1288 }, |
| 1283 | 1289 |
| 1284 _resetLineLevelCPUProfile: function() | 1290 _resetLineLevelCPUProfile: function() |
| 1285 { | 1291 { |
| 1286 WebInspector.workspace.uiSourceCodes().forEach(uiSourceCode => uiSourceC
ode.removeAllLineDecorations(WebInspector.TimelineUIUtils.PerformanceLineDecorat
or.type)); | 1292 WebInspector.workspace.uiSourceCodes().forEach(uiSourceCode => uiSourceC
ode.removeAllLineDecorations(WebInspector.TimelineUIUtils.PerformanceLineDecorat
or.type)); |
| 1287 }, | 1293 }, |
| 1288 | 1294 |
| 1289 __proto__: WebInspector.Panel.prototype | 1295 __proto__: WebInspector.Panel.prototype |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 * @override | 2190 * @override |
| 2185 * @param {!WebInspector.Target} target | 2191 * @param {!WebInspector.Target} target |
| 2186 */ | 2192 */ |
| 2187 targetRemoved: function(target) | 2193 targetRemoved: function(target) |
| 2188 { | 2194 { |
| 2189 this._targets.remove(target, true); | 2195 this._targets.remove(target, true); |
| 2190 }, | 2196 }, |
| 2191 | 2197 |
| 2192 __proto__: WebInspector.Object.prototype | 2198 __proto__: WebInspector.Object.prototype |
| 2193 } | 2199 } |
| OLD | NEW |