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

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

Issue 463853002: Power profiler should check for the capability CanProfilePower (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index b4c57d49f0ce8861eb0b4195b6795f67e82185f5..22f78cfbf5b5f400bf2d45a5f9614544af4fd612 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -371,7 +371,8 @@ WebInspector.TimelinePanel.prototype = {
this._captureMemorySetting,
WebInspector.UIString("Capture memory information on every timeline event")));
this._captureMemorySetting.addChangeListener(this._onModeChanged, this);
- if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) {
+ if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled() &&
+ WebInspector.targetManager.mainTarget().hasCapability(WebInspector.Target.Capabilities.CanProfilePower)) {
this._capturePowerSetting = WebInspector.settings.createSetting("timelineCapturePower", false);
panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Power"),
this._capturePowerSetting,
@@ -612,7 +613,8 @@ WebInspector.TimelinePanel.prototype = {
this._addModeView(new WebInspector.MemoryCountersGraph(this, this._model, this._uiUtils));
}
- if (this._capturePowerSetting && this._capturePowerSetting.get()) {
+ if (this._capturePowerSetting && this._capturePowerSetting.get() &&
+ WebInspector.targetManager.mainTarget().hasCapability(WebInspector.Target.Capabilities.CanProfilePower)) {
if (!isFrameMode) // Frame mode skews time, don't render aux overviews.
this._overviewControls.push(new WebInspector.TimelinePowerOverview(this._model));
this._addModeView(new WebInspector.TimelinePowerGraph(this, this._model));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698