Commit 4296cd33 authored by alph's avatar alph Committed by Commit bot

DevTools: remove extra options from Timeline Advanced mode.

BUG=570441

Review-Url: https://codereview.chromium.org/2581003002
Cr-Commit-Position: refs/heads/master@{#438997}
parent ab2b82e8
......@@ -33,10 +33,14 @@ Timeline.TimelineController = class {
startRecording(options, providers) {
this._extensionTraceProviders = Extensions.extensionServer.traceProviders().slice();
/**
* @param {string} category
* @return {string}
*/
function disabledByDefault(category) {
return 'disabled-by-default-' + category;
}
var categoriesArray = [
const categoriesArray = [
'-*', 'devtools.timeline', 'v8.execute', disabledByDefault('devtools.timeline'),
disabledByDefault('devtools.timeline.frame'), SDK.TracingModel.TopLevelEventCategory,
TimelineModel.TimelineModel.Category.Console, TimelineModel.TimelineModel.Category.UserTiming
......@@ -64,8 +68,7 @@ Timeline.TimelineController = class {
this._extensionSessions = providers.map(provider => new Timeline.ExtensionTracingSession(provider, this._delegate));
this._extensionSessions.forEach(session => session.start());
var categories = categoriesArray.join(',');
this._startRecordingWithCategories(categories, options.enableJSSampling);
this._startRecordingWithCategories(categoriesArray.join(','), options.enableJSSampling);
}
stopRecording() {
......
......@@ -21,8 +21,7 @@ Timeline.TimelineLandingPage = class extends UI.VBox {
tab.appendDescription(createElement('p'));
tab.appendDescription(Common.UIString(
'The basic profile collects network, JavaScript and browser activity as you interact with the page.'));
tab.appendOption(config.network, false, true);
tab.appendOption(config.screenshots, true, true);
tab.appendOption(config.screenshots, true);
this._tabbedPane.appendTab(perspectives.Responsiveness, Common.UIString('Basic'), tab);
tab = new Timeline.TimelineLandingPage.PerspectiveTabWidget();
......@@ -30,11 +29,9 @@ Timeline.TimelineLandingPage = class extends UI.VBox {
'Select what additional details you’d like to record. ' +
'By default, the advanced profile will collect all data of the basic profile.\u2002'));
tab.appendDescription(learnMore());
tab.appendOption(config.network, true, true);
tab.appendOption(config.javascript, true, true);
tab.appendOption(config.screenshots, true, true);
tab.appendOption(config.memory, true, false);
tab.appendOption(config.paints, true, false);
tab.appendOption(config.screenshots, true);
tab.appendOption(config.javascript, true);
tab.appendOption(config.paints, false);
this._tabbedPane.appendTab(perspectives.Custom, Common.UIString('Advanced'), tab);
this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._tabSelected, this);
......@@ -73,12 +70,6 @@ Timeline.TimelineLandingPage.RecordingOption;
/** @type {!Object<string, !Timeline.TimelineLandingPage.RecordingOption>} */
Timeline.TimelineLandingPage.RecordingConfig = {
network: {
id: 'network',
title: Common.UIString('Network'),
description: Common.UIString('Capture network requests information.'),
setting: 'timelineCaptureNetwork'
},
javascript: {
id: 'javascript',
title: Common.UIString('JavaScript'),
......@@ -98,12 +89,6 @@ Timeline.TimelineLandingPage.RecordingConfig = {
description: Common.UIString(
'Capture graphics layer positions and rasterization draw calls (moderate performance overhead).'),
setting: 'timelineCaptureLayersAndPictures'
},
memory: {
id: 'memory',
title: Common.UIString('Memory'),
description: Common.UIString('Capture memory statistics on every timeline event.'),
setting: 'timelineCaptureMemory'
}
};
......@@ -131,14 +116,11 @@ Timeline.TimelineLandingPage.PerspectiveTabWidget = class extends UI.VBox {
/**
* @param {!Timeline.TimelineLandingPage.RecordingOption} option
* @param {boolean} visible
* @param {boolean} enabled
*/
appendOption(option, visible, enabled) {
appendOption(option, enabled) {
if (enabled)
this._enabledOptions.add(option.id);
if (!visible)
return;
const div = createElementWithClass('div', 'recording-setting');
const value = this._enabledOptions.has(option.id);
const setting = Common.settings.createSetting(option.setting, value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment