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

Unified Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js

Issue 2782953002: DevTools: Make EntryHighlighted an event rather than method on data provider (Closed)
Patch Set: clean up Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileFlameChart.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
index f772bad6fd11c6ce76be0fc0dd27b25797cf0ded..8b3e8916550bbd11fdf63fdb7b34b30bad3ff3e3 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
@@ -165,14 +165,14 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
return;
this._highlightedEntryIndex = entryIndex;
this._updateElementPosition(this._highlightElement, this._highlightedEntryIndex);
- this._dataProvider.highlightEntry(entryIndex);
+ this.dispatchEventToListeners(PerfUI.FlameChart.Events.EntryHighlighted, entryIndex);
}
hideHighlight() {
this._entryInfo.removeChildren();
this._highlightedEntryIndex = -1;
this._updateElementPosition(this._highlightElement, this._highlightedEntryIndex);
- this._dataProvider.highlightEntry(-1);
+ this.dispatchEventToListeners(PerfUI.FlameChart.Events.EntryHighlighted, -1);
}
_resetCanvas() {
@@ -1414,11 +1414,6 @@ PerfUI.FlameChartDataProvider.prototype = {
/**
* @param {number} entryIndex
- */
- highlightEntry(entryIndex) {},
-
- /**
- * @param {number} entryIndex
* @return {boolean}
*/
forceDecoration(entryIndex) {},
@@ -1462,7 +1457,8 @@ PerfUI.FlameChartMarker.prototype = {
/** @enum {symbol} */
PerfUI.FlameChart.Events = {
- EntrySelected: Symbol('EntrySelected')
+ EntrySelected: Symbol('EntrySelected'),
+ EntryHighlighted: Symbol('EntryHighlighted')
};
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698