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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 1663723002: [DevTools] Add sourceMap support for blackboxing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@call-set-blackboxed-ranges-on-script-parsed
Patch Set: Created 4 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
OLDNEW
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(thi s); 338 WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(thi s);
339 /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.Timelin eFrame|!WebInspector.TimelineIRModel.Phases>} */ 339 /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.Timelin eFrame|!WebInspector.TimelineIRModel.Phases>} */
340 this._entryData = []; 340 this._entryData = [];
341 /** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */ 341 /** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */
342 this._entryTypeByLevel = []; 342 this._entryTypeByLevel = [];
343 /** @type {!Array<string>} */ 343 /** @type {!Array<string>} */
344 this._entryIndexToTitle = []; 344 this._entryIndexToTitle = [];
345 /** @type {!Array.<!WebInspector.TimelineFlameChartMarker>} */ 345 /** @type {!Array.<!WebInspector.TimelineFlameChartMarker>} */
346 this._markers = []; 346 this._markers = [];
347 this._asyncColorByCategory = {}; 347 this._asyncColorByCategory = {};
348 /** @type {!Map<string, boolean>} */
349 this._blackboxingURLCache = new Map();
350 }, 348 },
351 349
352 /** 350 /**
353 * @override 351 * @override
354 * @return {!WebInspector.FlameChart.TimelineData} 352 * @return {!WebInspector.FlameChart.TimelineData}
355 */ 353 */
356 timelineData: function() 354 timelineData: function()
357 { 355 {
358 if (this._timelineData) 356 if (this._timelineData)
359 return this._timelineData; 357 return this._timelineData;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 var url = event.args["data"]["url"]; 462 var url = event.args["data"]["url"];
465 return url && this._isBlackboxedURL(url); 463 return url && this._isBlackboxedURL(url);
466 }, 464 },
467 465
468 /** 466 /**
469 * @param {string} url 467 * @param {string} url
470 * @return {boolean} 468 * @return {boolean}
471 */ 469 */
472 _isBlackboxedURL: function(url) 470 _isBlackboxedURL: function(url)
473 { 471 {
474 if (this._blackboxingURLCache.has(url)) 472 return WebInspector.blackboxManager.isBlackboxedURL(url);
475 return /** @type {boolean} */ (this._blackboxingURLCache.get(url));
476 var result = WebInspector.BlackboxSupport.isBlackboxedURL(url);
477 this._blackboxingURLCache.set(url, result);
478 return result;
479 }, 473 },
480 474
481 /** 475 /**
482 * @param {!Map<!WebInspector.AsyncEventGroup, !Array<!WebInspector.TracingM odel.AsyncEvent>>} asyncEvents 476 * @param {!Map<!WebInspector.AsyncEventGroup, !Array<!WebInspector.TracingM odel.AsyncEvent>>} asyncEvents
483 */ 477 */
484 _appendAsyncEvents: function(asyncEvents) 478 _appendAsyncEvents: function(asyncEvents)
485 { 479 {
486 var groups = Object.values(WebInspector.TimelineUIUtils.asyncEventGroups ()); 480 var groups = Object.values(WebInspector.TimelineUIUtils.asyncEventGroups ());
487 481
488 for (var groupIndex = 0; groupIndex < groups.length; ++groupIndex) { 482 for (var groupIndex = 0; groupIndex < groups.length; ++groupIndex) {
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 * @param {number} windowStartTime 1269 * @param {number} windowStartTime
1276 * @param {number} windowEndTime 1270 * @param {number} windowEndTime
1277 */ 1271 */
1278 requestWindowTimes: function(windowStartTime, windowEndTime) 1272 requestWindowTimes: function(windowStartTime, windowEndTime)
1279 { 1273 {
1280 this._delegate.requestWindowTimes(windowStartTime, windowEndTime); 1274 this._delegate.requestWindowTimes(windowStartTime, windowEndTime);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 /** 1427 /**
1434 * @constructor 1428 * @constructor
1435 * @param {!WebInspector.TimelineSelection} selection 1429 * @param {!WebInspector.TimelineSelection} selection
1436 * @param {number} entryIndex 1430 * @param {number} entryIndex
1437 */ 1431 */
1438 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) 1432 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex)
1439 { 1433 {
1440 this.timelineSelection = selection; 1434 this.timelineSelection = selection;
1441 this.entryIndex = entryIndex; 1435 this.entryIndex = entryIndex;
1442 } 1436 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698