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

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

Issue 423433004: DevTools: move the "Capture *" checkboxes from timeline sidebar to the toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: 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 c86803a987b080ccf02cb05d81e5eee2192e389b..1c4573070ca55651de38d6602fb83633575f14eb 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -113,17 +113,13 @@ WebInspector.TimelinePanel = function()
this._flameChartEnabledSetting = WebInspector.settings.createSetting("timelineFlameChartEnabled", false);
this._createStatusBarItems();
- this._topPane = new WebInspector.SplitView(true, false);
- this._topPane.element.id = "timeline-overview-panel";
- this._topPane.show(this.element);
- this._topPane.addEventListener(WebInspector.SplitView.Events.SidebarSizeChanged, this._sidebarResized, this);
- this._topPane.setResizable(false);
- this._createRecordingOptions();
+ var topPaneElement = this.element.createChild("div", "hbox");
+ topPaneElement.id = "timeline-overview-panel";
// Create top overview component.
this._overviewPane = new WebInspector.TimelineOverviewPane(this._model, this._uiUtils);
this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.WindowChanged, this._onWindowChanged.bind(this));
- this._overviewPane.show(this._topPane.mainElement());
+ this._overviewPane.show(topPaneElement);
this._createFileSelector();
this._registerShortcuts();
@@ -241,7 +237,6 @@ WebInspector.TimelinePanel.prototype = {
_sidebarResized: function(event)
{
var width = /** @type {number} */ (event.data);
- this._topPane.setSidebarSize(width);
for (var i = 0; i < this._currentViews.length; ++i)
this._currentViews[i].setSidebarSize(width);
},
@@ -324,7 +319,6 @@ WebInspector.TimelinePanel.prototype = {
{
modeView.setWindowTimes(this.windowStartTime(), this.windowEndTime());
modeView.refreshRecords(this._textFilter._regex);
- modeView.view().setSidebarSize(this._topPane.sidebarSize());
this._stackView.appendView(modeView.view(), "timelinePanelTimelineStackSplitViewState");
modeView.view().addEventListener(WebInspector.SplitView.Events.SidebarSizeChanged, this._sidebarResized, this);
this._currentViews.push(modeView);
@@ -357,36 +351,6 @@ WebInspector.TimelinePanel.prototype = {
return labelElement;
},
- _createRecordingOptions: function()
- {
- var topPaneSidebarElement = this._topPane.sidebarElement();
- this._captureStacksSetting = WebInspector.settings.createSetting("timelineCaptureStacks", true);
- topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Capture stacks"),
- this._captureStacksSetting,
- WebInspector.UIString("Capture JavaScript stack on every timeline event")));
-
- this._captureMemorySetting = WebInspector.settings.createSetting("timelineCaptureMemory", false);
- topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Capture memory"),
- this._captureMemorySetting,
- WebInspector.UIString("Capture memory information on every timeline event")));
- this._captureMemorySetting.addChangeListener(this._onModeChanged, this);
-
- if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) {
- this._capturePowerSetting = WebInspector.settings.createSetting("timelineCapturePower", false);
- topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Capture power"),
- this._capturePowerSetting,
- WebInspector.UIString("Capture power information")));
- this._capturePowerSetting.addChangeListener(this._onModeChanged, this);
- }
-
- if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
- this._captureLayersAndPicturesSetting = WebInspector.settings.createSetting("timelineCaptureLayersAndPictures", false);
- topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Capture pictures"),
- this._captureLayersAndPicturesSetting,
- WebInspector.UIString("Capture graphics layer positions and painted pictures")));
- }
- },
-
_createStatusBarItems: function()
{
var panelStatusBarElement = this.element.createChild("div", "panel-status-bar");
@@ -425,6 +389,29 @@ WebInspector.TimelinePanel.prototype = {
panelStatusBarElement.appendChild(flameChartToggleButton.element);
}
+ this._captureStacksSetting = WebInspector.settings.createSetting("timelineCaptureStacks", true);
+ panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Stacks"),
+ this._captureStacksSetting,
+ WebInspector.UIString("Capture JavaScript stack on every timeline event")));
+ this._captureMemorySetting = WebInspector.settings.createSetting("timelineCaptureMemory", false);
+ panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Memory"),
+ this._captureMemorySetting,
+ WebInspector.UIString("Capture memory information on every timeline event")));
+ this._captureMemorySetting.addChangeListener(this._onModeChanged, this);
+ if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) {
+ this._capturePowerSetting = WebInspector.settings.createSetting("timelineCapturePower", false);
+ panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Power"),
+ this._capturePowerSetting,
+ WebInspector.UIString("Capture power information")));
+ this._capturePowerSetting.addChangeListener(this._onModeChanged, this);
+ }
+ if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
+ this._captureLayersAndPicturesSetting = WebInspector.settings.createSetting("timelineCaptureLayersAndPictures", false);
+ panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Paint"),
+ this._captureLayersAndPicturesSetting,
+ WebInspector.UIString("Capture graphics layer positions and painted pictures")));
+ }
+
this._miscStatusBarItems = panelStatusBarElement.createChild("div", "status-bar-item");
this._filtersContainer = this.element.createChild("div", "timeline-filters-header hidden");

Powered by Google App Engine
This is Rietveld 408576698