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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js

Issue 2073343002: Timeline addTraceProvider API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timelineFlameChart.js Created 4 years, 6 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
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
index 63a911ee61f34234a7b5a5bea3198437b5bf6f0e..cfa549743db8f7b4ac202e0db86d9e329326b790 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -50,6 +50,8 @@ WebInspector.TimelinePanel = function()
this._millisecondsToRecordAfterLoadEvent = 3000;
this._toggleRecordAction = /** @type {!WebInspector.Action }*/ (WebInspector.actionRegistry.action("timeline.toggle-recording"));
+ this._extensionTraceProviders = WebInspector.extensionServer.traceProviders();
+
/** @type {!Array<!WebInspector.TimelineModel.Filter>} */
this._filters = [];
if (!Runtime.experiments.isEnabled("timelineShowAllEvents")) {
@@ -390,6 +392,13 @@ WebInspector.TimelinePanel.prototype = {
WebInspector.UIString("Memory"), this._captureMemorySetting, WebInspector.UIString("Capture memory information on every timeline event.")));
this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(
WebInspector.UIString("Paint"), this._captureLayersAndPicturesSetting, WebInspector.UIString("Capture graphics layer positions and rasterization draw calls. (Has large performance overhead)")));
+
+ for (var provider of this._extensionTraceProviders) {
+ this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(
caseq 2016/07/11 18:58:38 let's also have some handling for trace providers
+ WebInspector.UIString(provider.categoryName),
+ WebInspector.settings.createSetting(provider.categoryName, false),
+ WebInspector.UIString(provider.categoryTooltip)));
+ }
} else {
this._panelToolbar.appendToolbarItem(screenshotCheckbox);
}
@@ -772,7 +781,7 @@ WebInspector.TimelinePanel.prototype = {
if (this._statusPane)
this._statusPane.updateStatus(WebInspector.UIString("Processing timeline\u2026"));
- this._model.setEvents(this._tracingModel, loadedFromFile);
+ this._model.setEvents(this._tracingModel, this._extensionTraceProviders, loadedFromFile);
this._frameModel.reset();
this._frameModel.addTraceEvents(this._model.target(), this._model.inspectedTargetEvents(), this._model.sessionId() || "");

Powered by Google App Engine
This is Rietveld 408576698