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

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

Issue 1774503005: [DevTools] Roll closure compiler to ToT version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 else 340 else
341 return WebInspector.TimelineFlameChartDataProviderBase.prototype.tex tColor.call(this, index); 341 return WebInspector.TimelineFlameChartDataProviderBase.prototype.tex tColor.call(this, index);
342 }, 342 },
343 343
344 /** 344 /**
345 * @override 345 * @override
346 */ 346 */
347 reset: function() 347 reset: function()
348 { 348 {
349 WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(thi s); 349 WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(thi s);
350 /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.Timelin eFrame|!WebInspector.TimelineIRModel.Phases>} */ 350 /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.Timelin eFrame|!WebInspector.TimelineIRModel.Phases|null>} */
351 this._entryData = []; 351 this._entryData = [];
352 /** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */ 352 /** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */
353 this._entryTypeByLevel = []; 353 this._entryTypeByLevel = [];
354 /** @type {!Array<string>} */ 354 /** @type {!Array<string>} */
355 this._entryIndexToTitle = []; 355 this._entryIndexToTitle = [];
356 /** @type {!Array.<!WebInspector.TimelineFlameChartMarker>} */ 356 /** @type {!Array.<!WebInspector.TimelineFlameChartMarker>} */
357 this._markers = []; 357 this._markers = [];
358 this._asyncColorByCategory = {}; 358 this._asyncColorByCategory = {};
359 }, 359 },
360 360
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 this._timelineData.entryTotalTimes[index] = frame.duration; 836 this._timelineData.entryTotalTimes[index] = frame.duration;
837 this._timelineData.entryStartTimes[index] = frame.startTime; 837 this._timelineData.entryStartTimes[index] = frame.startTime;
838 }, 838 },
839 839
840 /** 840 /**
841 * @param {!Segment} segment 841 * @param {!Segment} segment
842 */ 842 */
843 _appendSegment: function(segment) 843 _appendSegment: function(segment)
844 { 844 {
845 var index = this._entryData.length; 845 var index = this._entryData.length;
846 this._entryData.push(segment.data); 846 this._entryData.push(/** @type {!WebInspector.TimelineIRModel.Phases} */ (segment.data));
lushnikov 2016/03/08 20:01:49 over to @alph
847 this._entryIndexToTitle[index] = /** @type {string} */ (segment.data); 847 this._entryIndexToTitle[index] = /** @type {string} */ (segment.data);
848 this._timelineData.entryLevels[index] = this._currentLevel; 848 this._timelineData.entryLevels[index] = this._currentLevel;
849 this._timelineData.entryTotalTimes[index] = segment.end - segment.begin; 849 this._timelineData.entryTotalTimes[index] = segment.end - segment.begin;
850 this._timelineData.entryStartTimes[index] = segment.begin; 850 this._timelineData.entryStartTimes[index] = segment.begin;
851 }, 851 },
852 852
853 /** 853 /**
854 * @override 854 * @override
855 * @param {number} entryIndex 855 * @param {number} entryIndex
856 * @return {?WebInspector.TimelineSelection} 856 * @return {?WebInspector.TimelineSelection}
(...skipping 15 matching lines...) Expand all
872 * @param {?WebInspector.TimelineSelection} selection 872 * @param {?WebInspector.TimelineSelection} selection
873 * @return {number} 873 * @return {number}
874 */ 874 */
875 entryIndexForSelection: function(selection) 875 entryIndexForSelection: function(selection)
876 { 876 {
877 if (!selection || selection.type() === WebInspector.TimelineSelection.Ty pe.Range) 877 if (!selection || selection.type() === WebInspector.TimelineSelection.Ty pe.Range)
878 return -1; 878 return -1;
879 879
880 if (this._lastSelection && this._lastSelection.timelineSelection.object( ) === selection.object()) 880 if (this._lastSelection && this._lastSelection.timelineSelection.object( ) === selection.object())
881 return this._lastSelection.entryIndex; 881 return this._lastSelection.entryIndex;
882 var index = this._entryData.indexOf(selection.object()); 882 var index = this._entryData.indexOf(/** @type {!WebInspector.TracingMode l.Event|!WebInspector.TimelineFrame|!WebInspector.TimelineIRModel.Phases} */(sel ection.object()));
883 if (index !== -1) 883 if (index !== -1)
884 this._lastSelection = new WebInspector.TimelineFlameChartView.Select ion(selection, index); 884 this._lastSelection = new WebInspector.TimelineFlameChartView.Select ion(selection, index);
885 return index; 885 return index;
886 }, 886 },
887 887
888 __proto__: WebInspector.TimelineFlameChartDataProviderBase.prototype 888 __proto__: WebInspector.TimelineFlameChartDataProviderBase.prototype
889 } 889 }
890 890
891 /** 891 /**
892 * @constructor 892 * @constructor
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 /** 1447 /**
1448 * @constructor 1448 * @constructor
1449 * @param {!WebInspector.TimelineSelection} selection 1449 * @param {!WebInspector.TimelineSelection} selection
1450 * @param {number} entryIndex 1450 * @param {number} entryIndex
1451 */ 1451 */
1452 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) 1452 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex)
1453 { 1453 {
1454 this.timelineSelection = selection; 1454 this.timelineSelection = selection;
1455 this.entryIndex = entryIndex; 1455 this.entryIndex = entryIndex;
1456 } 1456 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698