| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(thi
s); | 340 WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(thi
s); |
| 341 /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.Timelin
eFrame|!WebInspector.TimelineIRModel.Phases>} */ | 341 /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.Timelin
eFrame|!WebInspector.TimelineIRModel.Phases>} */ |
| 342 this._entryData = []; | 342 this._entryData = []; |
| 343 /** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */ | 343 /** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */ |
| 344 this._entryTypeByLevel = []; | 344 this._entryTypeByLevel = []; |
| 345 /** @type {!Array<string>} */ | 345 /** @type {!Array<string>} */ |
| 346 this._entryIndexToTitle = []; | 346 this._entryIndexToTitle = []; |
| 347 /** @type {!Array.<!WebInspector.TimelineFlameChartMarker>} */ | 347 /** @type {!Array.<!WebInspector.TimelineFlameChartMarker>} */ |
| 348 this._markers = []; | 348 this._markers = []; |
| 349 this._asyncColorByCategory = {}; | 349 this._asyncColorByCategory = {}; |
| 350 /** @type {!Map<string, boolean>} */ | |
| 351 this._blackboxingURLCache = new Map(); | |
| 352 }, | 350 }, |
| 353 | 351 |
| 354 /** | 352 /** |
| 355 * @override | 353 * @override |
| 356 * @return {!WebInspector.FlameChart.TimelineData} | 354 * @return {!WebInspector.FlameChart.TimelineData} |
| 357 */ | 355 */ |
| 358 timelineData: function() | 356 timelineData: function() |
| 359 { | 357 { |
| 360 if (this._timelineData) | 358 if (this._timelineData) |
| 361 return this._timelineData; | 359 return this._timelineData; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 var url = event.args["data"]["url"]; | 464 var url = event.args["data"]["url"]; |
| 467 return url && this._isBlackboxedURL(url); | 465 return url && this._isBlackboxedURL(url); |
| 468 }, | 466 }, |
| 469 | 467 |
| 470 /** | 468 /** |
| 471 * @param {string} url | 469 * @param {string} url |
| 472 * @return {boolean} | 470 * @return {boolean} |
| 473 */ | 471 */ |
| 474 _isBlackboxedURL: function(url) | 472 _isBlackboxedURL: function(url) |
| 475 { | 473 { |
| 476 if (this._blackboxingURLCache.has(url)) | 474 return WebInspector.blackboxManager.isBlackboxedURL(url); |
| 477 return /** @type {boolean} */ (this._blackboxingURLCache.get(url)); | |
| 478 var result = WebInspector.BlackboxSupport.isBlackboxedURL(url); | |
| 479 this._blackboxingURLCache.set(url, result); | |
| 480 return result; | |
| 481 }, | 475 }, |
| 482 | 476 |
| 483 /** | 477 /** |
| 484 * @param {!Map<!WebInspector.AsyncEventGroup, !Array<!WebInspector.TracingM
odel.AsyncEvent>>} asyncEvents | 478 * @param {!Map<!WebInspector.AsyncEventGroup, !Array<!WebInspector.TracingM
odel.AsyncEvent>>} asyncEvents |
| 485 */ | 479 */ |
| 486 _appendAsyncEvents: function(asyncEvents) | 480 _appendAsyncEvents: function(asyncEvents) |
| 487 { | 481 { |
| 488 var groups = Object.values(WebInspector.TimelineUIUtils.asyncEventGroups
()); | 482 var groups = Object.values(WebInspector.TimelineUIUtils.asyncEventGroups
()); |
| 489 | 483 |
| 490 for (var groupIndex = 0; groupIndex < groups.length; ++groupIndex) { | 484 for (var groupIndex = 0; groupIndex < groups.length; ++groupIndex) { |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 this._splitWidget.show(this.element); | 1242 this._splitWidget.show(this.element); |
| 1249 } else { | 1243 } else { |
| 1250 this._mainView.show(this.element); | 1244 this._mainView.show(this.element); |
| 1251 } | 1245 } |
| 1252 | 1246 |
| 1253 this._onMainEntrySelected = this._onEntrySelected.bind(this, this._dataProvi
der); | 1247 this._onMainEntrySelected = this._onEntrySelected.bind(this, this._dataProvi
der); |
| 1254 this._onNetworkEntrySelected = this._onEntrySelected.bind(this, this._networ
kDataProvider); | 1248 this._onNetworkEntrySelected = this._onEntrySelected.bind(this, this._networ
kDataProvider); |
| 1255 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); | 1249 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); |
| 1256 this._mainView.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onMainEntrySelected, this); | 1250 this._mainView.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onMainEntrySelected, this); |
| 1257 this._networkView.addEventListener(WebInspector.FlameChart.Events.EntrySelec
ted, this._onNetworkEntrySelected, this); | 1251 this._networkView.addEventListener(WebInspector.FlameChart.Events.EntrySelec
ted, this._onNetworkEntrySelected, this); |
| 1258 WebInspector.BlackboxSupport.addChangeListener(this.refreshRecords, this); | 1252 WebInspector.blackboxManager.addChangeListener(this.refreshRecords, this); |
| 1259 } | 1253 } |
| 1260 | 1254 |
| 1261 WebInspector.TimelineFlameChartView.prototype = { | 1255 WebInspector.TimelineFlameChartView.prototype = { |
| 1262 /** | 1256 /** |
| 1263 * @override | 1257 * @override |
| 1264 */ | 1258 */ |
| 1265 dispose: function() | 1259 dispose: function() |
| 1266 { | 1260 { |
| 1267 this._model.removeEventListener(WebInspector.TimelineModel.Events.Record
ingStarted, this._onRecordingStarted, this); | 1261 this._model.removeEventListener(WebInspector.TimelineModel.Events.Record
ingStarted, this._onRecordingStarted, this); |
| 1268 this._mainView.removeEventListener(WebInspector.FlameChart.Events.EntryS
elected, this._onMainEntrySelected, this); | 1262 this._mainView.removeEventListener(WebInspector.FlameChart.Events.EntryS
elected, this._onMainEntrySelected, this); |
| 1269 this._networkView.removeEventListener(WebInspector.FlameChart.Events.Ent
rySelected, this._onNetworkEntrySelected, this); | 1263 this._networkView.removeEventListener(WebInspector.FlameChart.Events.Ent
rySelected, this._onNetworkEntrySelected, this); |
| 1270 WebInspector.BlackboxSupport.removeChangeListener(this.refreshRecords, t
his); | 1264 WebInspector.blackboxManager.removeChangeListener(this.refreshRecords, t
his); |
| 1271 }, | 1265 }, |
| 1272 | 1266 |
| 1273 /** | 1267 /** |
| 1274 * @override | 1268 * @override |
| 1275 * @return {?Element} | 1269 * @return {?Element} |
| 1276 */ | 1270 */ |
| 1277 resizerElement: function() | 1271 resizerElement: function() |
| 1278 { | 1272 { |
| 1279 return null; | 1273 return null; |
| 1280 }, | 1274 }, |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 /** | 1436 /** |
| 1443 * @constructor | 1437 * @constructor |
| 1444 * @param {!WebInspector.TimelineSelection} selection | 1438 * @param {!WebInspector.TimelineSelection} selection |
| 1445 * @param {number} entryIndex | 1439 * @param {number} entryIndex |
| 1446 */ | 1440 */ |
| 1447 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) | 1441 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) |
| 1448 { | 1442 { |
| 1449 this.timelineSelection = selection; | 1443 this.timelineSelection = selection; |
| 1450 this.entryIndex = entryIndex; | 1444 this.entryIndex = entryIndex; |
| 1451 } | 1445 } |
| OLD | NEW |