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

Unified Diff: Source/devtools/front_end/TimelinePanel.js

Issue 104523002: [DevTools] Add power profiler and power overview in timeline panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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: Source/devtools/front_end/TimelinePanel.js
diff --git a/Source/devtools/front_end/TimelinePanel.js b/Source/devtools/front_end/TimelinePanel.js
old mode 100644
new mode 100755
index 59a2b117235eab11624afa8374542e28b0ebe3ea..23489ce385797035bbe83666db5bc42ce3f206cd
--- a/Source/devtools/front_end/TimelinePanel.js
+++ b/Source/devtools/front_end/TimelinePanel.js
@@ -152,6 +152,9 @@ WebInspector.TimelinePanel = function()
this._itemsGraphsElement.id = "timeline-graphs";
this._gridContainer.element.appendChild(this._timelineGrid.element);
this._timelineGrid.gridHeaderElement.id = "timeline-grid-header";
+ if (this._powerProfileEnabled)
+ this._timelineGrid.gridHeaderElement.addStyleClass("with-power");
pfeldman 2014/01/09 11:38:52 No hacks like this please.
+
this._timelineGrid.gridHeaderElement.addStyleClass("fill");
this._memoryStatistics.setMainTimelineGrid(this._timelineGrid);
this._timelineMemorySplitter.mainElement.appendChild(this._timelineGrid.gridHeaderElement);
@@ -548,12 +551,16 @@ WebInspector.TimelinePanel.prototype = {
if (frameMode) {
this.element.addStyleClass("timeline-frame-overview");
+ if (this._powerProfileEnabled)
+ this.element.addStyleClass("with-power");
this.recordsCounter.element.addStyleClass("hidden");
this._frameController = new WebInspector.TimelineFrameController(this._model, this._overviewPane, this._presentationModel);
} else {
this._frameController.dispose();
this._frameController = null;
this.element.removeStyleClass("timeline-frame-overview");
+ if (this._powerProfileEnabled)
+ this.element.removeStyleClass("with-power");
this.recordsCounter.element.removeStyleClass("hidden");
}
}

Powered by Google App Engine
This is Rietveld 408576698