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

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 631573002: [Devtools] Replace "Stacks" with "Causes" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update per reviewer comments, and remove the causes tab Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 panelStatusBarElement.appendChild(framesToggleButton.element); 340 panelStatusBarElement.appendChild(framesToggleButton.element);
341 341
342 if (Runtime.experiments.isEnabled("timelineOnTraceEvents")) { 342 if (Runtime.experiments.isEnabled("timelineOnTraceEvents")) {
343 var flameChartToggleButton = new WebInspector.StatusBarButton(WebIns pector.UIString("Tracing mode"), "timeline-flame-chart-status-bar-item"); 343 var flameChartToggleButton = new WebInspector.StatusBarButton(WebIns pector.UIString("Tracing mode"), "timeline-flame-chart-status-bar-item");
344 flameChartToggleButton.toggled = this._flameChartEnabledSetting.get( ); 344 flameChartToggleButton.toggled = this._flameChartEnabledSetting.get( );
345 flameChartToggleButton.addEventListener("click", this._flameChartEna bledChanged.bind(this, flameChartToggleButton)); 345 flameChartToggleButton.addEventListener("click", this._flameChartEna bledChanged.bind(this, flameChartToggleButton));
346 this._statusBarButtons.push(flameChartToggleButton); 346 this._statusBarButtons.push(flameChartToggleButton);
347 panelStatusBarElement.appendChild(flameChartToggleButton.element); 347 panelStatusBarElement.appendChild(flameChartToggleButton.element);
348 } 348 }
349 349
350 this._captureStacksSetting = WebInspector.settings.createSetting("timeli neCaptureStacks", true); 350 this._captureCausesSetting = WebInspector.settings.createSetting("timeli neCaptureCauses", true);
351 this._captureStacksSetting.addChangeListener(this._refreshViews, this); 351 this._captureCausesSetting.addChangeListener(this._refreshViews, this);
352 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect or.UIString("Stacks"), 352 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect or.UIString("Causes"),
353 this._capt ureStacksSetting, 353 this._capt ureCausesSetting,
354 WebInspect or.UIString("Capture JavaScript stack on every timeline event"))); 354 WebInspect or.UIString("Capture causes for timeline events (e.g., stack traces)")));
355 this._captureMemorySetting = WebInspector.settings.createSetting("timeli neCaptureMemory", false); 355 this._captureMemorySetting = WebInspector.settings.createSetting("timeli neCaptureMemory", false);
356 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect or.UIString("Memory"), 356 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect or.UIString("Memory"),
357 this._capt ureMemorySetting, 357 this._capt ureMemorySetting,
358 WebInspect or.UIString("Capture memory information on every timeline event"))); 358 WebInspect or.UIString("Capture memory information on every timeline event")));
359 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); 359 this._captureMemorySetting.addChangeListener(this._onModeChanged, this);
360 if (Runtime.experiments.isEnabled("timelinePowerProfiler") && 360 if (Runtime.experiments.isEnabled("timelinePowerProfiler") &&
361 WebInspector.targetManager.mainTarget().hasCapability(WebInspector.T arget.Capabilities.CanProfilePower)) { 361 WebInspector.targetManager.mainTarget().hasCapability(WebInspector.T arget.Capabilities.CanProfilePower)) {
362 this._capturePowerSetting = WebInspector.settings.createSetting("tim elineCapturePower", false); 362 this._capturePowerSetting = WebInspector.settings.createSetting("tim elineCapturePower", false);
363 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Power"), 363 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Power"),
364 this._ capturePowerSetting, 364 this._ capturePowerSetting,
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 this._recordingOptionUIControls.forEach(handler); 632 this._recordingOptionUIControls.forEach(handler);
633 WebInspector.inspectorView.setCurrentPanelLocked(!enabled); 633 WebInspector.inspectorView.setCurrentPanelLocked(!enabled);
634 }, 634 },
635 635
636 /** 636 /**
637 * @param {boolean} userInitiated 637 * @param {boolean} userInitiated
638 */ 638 */
639 _startRecording: function(userInitiated) 639 _startRecording: function(userInitiated)
640 { 640 {
641 this._userInitiatedRecording = userInitiated; 641 this._userInitiatedRecording = userInitiated;
642 this._model.startRecording(this._captureStacksSetting.get(), this._captu reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay ersAndPicturesSetting.get()); 642 this._model.startRecording(this._captureCausesSetting.get(), this._captu reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay ersAndPicturesSetting.get());
643 if (this._lazyFrameModel) 643 if (this._lazyFrameModel)
644 this._lazyFrameModel.setMergeRecords(false); 644 this._lazyFrameModel.setMergeRecords(false);
645 645
646 for (var i = 0; i < this._overviewControls.length; ++i) 646 for (var i = 0; i < this._overviewControls.length; ++i)
647 this._overviewControls[i].timelineStarted(); 647 this._overviewControls[i].timelineStarted();
648 648
649 if (userInitiated) 649 if (userInitiated)
650 WebInspector.userMetrics.TimelineStarted.record(); 650 WebInspector.userMetrics.TimelineStarted.record();
651 this._setUIControlsEnabled(false); 651 this._setUIControlsEnabled(false);
652 }, 652 },
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 1456
1457 WebInspector.TimelinePanelFactory.prototype = { 1457 WebInspector.TimelinePanelFactory.prototype = {
1458 /** 1458 /**
1459 * @return {!WebInspector.Panel} 1459 * @return {!WebInspector.Panel}
1460 */ 1460 */
1461 createPanel: function() 1461 createPanel: function()
1462 { 1462 {
1463 return WebInspector.TimelinePanel._instance(); 1463 return WebInspector.TimelinePanel._instance();
1464 } 1464 }
1465 } 1465 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698