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

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

Issue 396803008: Remove some of timeline experiments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 this.registerRequiredCSS("timelinePanel.css"); 68 this.registerRequiredCSS("timelinePanel.css");
69 this.registerRequiredCSS("layersPanel.css"); 69 this.registerRequiredCSS("layersPanel.css");
70 this.registerRequiredCSS("filter.css"); 70 this.registerRequiredCSS("filter.css");
71 this.element.addEventListener("contextmenu", this._contextMenu.bind(this), f alse); 71 this.element.addEventListener("contextmenu", this._contextMenu.bind(this), f alse);
72 72
73 this._detailsLinkifier = new WebInspector.Linkifier(); 73 this._detailsLinkifier = new WebInspector.Linkifier();
74 this._windowStartTime = 0; 74 this._windowStartTime = 0;
75 this._windowEndTime = Infinity; 75 this._windowEndTime = Infinity;
76 76
77 // Create model. 77 // Create model.
78 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled() || 78 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
79 WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
80 this._tracingModel = new WebInspector.TracingModel(WebInspector.targetMa nager.activeTarget()); 79 this._tracingModel = new WebInspector.TracingModel(WebInspector.targetMa nager.activeTarget());
81 this._tracingModel.addEventListener(WebInspector.TracingModel.Events.Buf ferUsage, this._onTracingBufferUsage, this); 80 this._tracingModel.addEventListener(WebInspector.TracingModel.Events.Buf ferUsage, this._onTracingBufferUsage, this);
82 81
83 this._uiUtils = new WebInspector.TracingTimelineUIUtils(); 82 this._uiUtils = new WebInspector.TracingTimelineUIUtils();
84 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this. _tracingModel, this._uiUtils.hiddenRecordsFilter()); 83 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this. _tracingModel, this._uiUtils.hiddenRecordsFilter());
85 this._model = this._tracingTimelineModel; 84 this._model = this._tracingTimelineModel;
86 } else { 85 } else {
87 this._uiUtils = new WebInspector.TimelineUIUtilsImpl(); 86 this._uiUtils = new WebInspector.TimelineUIUtilsImpl();
88 this._model = new WebInspector.TimelineModelImpl(WebInspector.timelineMa nager); 87 this._model = new WebInspector.TimelineModelImpl(WebInspector.timelineMa nager);
89 } 88 }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); 357 this._captureMemorySetting.addChangeListener(this._onModeChanged, this);
359 358
360 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) { 359 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) {
361 this._capturePowerSetting = WebInspector.settings.createSetting("tim elineCapturePower", false); 360 this._capturePowerSetting = WebInspector.settings.createSetting("tim elineCapturePower", false);
362 topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Capture power"), 361 topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Capture power"),
363 this._ capturePowerSetting, 362 this._ capturePowerSetting,
364 WebIns pector.UIString("Capture power information"))); 363 WebIns pector.UIString("Capture power information")));
365 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi s); 364 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi s);
366 } 365 }
367 366
368 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()) { 367 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
369 this._captureTracingSetting = WebInspector.settings.createSetting("t imelineCaptureTracing", false);
370 topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Capture tracing"),
371 this._ captureTracingSetting,
372 WebIns pector.UIString("Capture tracing information")));
373 this._captureTracingSetting.addChangeListener(this._onModeChanged, t his);
374 } else if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnab led()) {
375 this._captureLayersAndPicturesSetting = WebInspector.settings.create Setting("timelineCaptureLayersAndPictures", false); 368 this._captureLayersAndPicturesSetting = WebInspector.settings.create Setting("timelineCaptureLayersAndPictures", false);
376 topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Capture pictures"), 369 topPaneSidebarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Capture pictures"),
377 this._ captureLayersAndPicturesSetting, 370 this._ captureLayersAndPicturesSetting,
378 WebIns pector.UIString("Capture graphics layer positions and painted pictures"))); 371 WebIns pector.UIString("Capture graphics layer positions and painted pictures")));
379 } 372 }
380 }, 373 },
381 374
382 _createStatusBarItems: function() 375 _createStatusBarItems: function()
383 { 376 {
384 var panelStatusBarElement = this.element.createChild("div", "panel-statu s-bar"); 377 var panelStatusBarElement = this.element.createChild("div", "panel-statu s-bar");
(...skipping 17 matching lines...) Expand all
402 garbageCollectButton.addEventListener("click", this._garbageCollectButto nClicked, this); 395 garbageCollectButton.addEventListener("click", this._garbageCollectButto nClicked, this);
403 this._statusBarButtons.push(garbageCollectButton); 396 this._statusBarButtons.push(garbageCollectButton);
404 panelStatusBarElement.appendChild(garbageCollectButton.element); 397 panelStatusBarElement.appendChild(garbageCollectButton.element);
405 398
406 var framesToggleButton = new WebInspector.StatusBarButton(WebInspector.U IString("Frames mode"), "timeline-frames-status-bar-item"); 399 var framesToggleButton = new WebInspector.StatusBarButton(WebInspector.U IString("Frames mode"), "timeline-frames-status-bar-item");
407 framesToggleButton.toggled = this._overviewModeSetting.get() === WebInsp ector.TimelinePanel.OverviewMode.Frames; 400 framesToggleButton.toggled = this._overviewModeSetting.get() === WebInsp ector.TimelinePanel.OverviewMode.Frames;
408 framesToggleButton.addEventListener("click", this._overviewModeChanged.b ind(this, framesToggleButton)); 401 framesToggleButton.addEventListener("click", this._overviewModeChanged.b ind(this, framesToggleButton));
409 this._statusBarButtons.push(framesToggleButton); 402 this._statusBarButtons.push(framesToggleButton);
410 panelStatusBarElement.appendChild(framesToggleButton.element); 403 panelStatusBarElement.appendChild(framesToggleButton.element);
411 404
412 if (WebInspector.experimentsSettings.timelineFlameChart.isEnabled()) { 405 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
413 var flameChartToggleButton = new WebInspector.StatusBarButton(WebIns pector.UIString("Tracing mode"), "timeline-flame-chart-status-bar-item"); 406 var flameChartToggleButton = new WebInspector.StatusBarButton(WebIns pector.UIString("Tracing mode"), "timeline-flame-chart-status-bar-item");
414 flameChartToggleButton.toggled = this._flameChartEnabledSetting.get( ); 407 flameChartToggleButton.toggled = this._flameChartEnabledSetting.get( );
415 flameChartToggleButton.addEventListener("click", this._flameChartEna bledChanged.bind(this, flameChartToggleButton)); 408 flameChartToggleButton.addEventListener("click", this._flameChartEna bledChanged.bind(this, flameChartToggleButton));
416 this._statusBarButtons.push(flameChartToggleButton); 409 this._statusBarButtons.push(flameChartToggleButton);
417 panelStatusBarElement.appendChild(flameChartToggleButton.element); 410 panelStatusBarElement.appendChild(flameChartToggleButton.element);
418 } 411 }
419 412
420 this._miscStatusBarItems = panelStatusBarElement.createChild("div", "sta tus-bar-item"); 413 this._miscStatusBarItems = panelStatusBarElement.createChild("div", "sta tus-bar-item");
421 414
422 this._filtersContainer = this.element.createChild("div", "timeline-filte rs-header hidden"); 415 this._filtersContainer = this.element.createChild("div", "timeline-filte rs-header hidden");
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 637
645 var isFrameMode = this._overviewModeSetting.get() === WebInspector.Timel inePanel.OverviewMode.Frames; 638 var isFrameMode = this._overviewModeSetting.get() === WebInspector.Timel inePanel.OverviewMode.Frames;
646 this._removeAllModeViews(); 639 this._removeAllModeViews();
647 this._overviewControls = []; 640 this._overviewControls = [];
648 641
649 if (isFrameMode) 642 if (isFrameMode)
650 this._overviewControls.push(new WebInspector.TimelineFrameOverview(t his._model, this._frameModel())); 643 this._overviewControls.push(new WebInspector.TimelineFrameOverview(t his._model, this._frameModel()));
651 else 644 else
652 this._overviewControls.push(new WebInspector.TimelineEventOverview(t his._model, this._uiUtils)); 645 this._overviewControls.push(new WebInspector.TimelineEventOverview(t his._model, this._uiUtils));
653 646
654 if (WebInspector.experimentsSettings.timelineFlameChart.isEnabled() && t his._flameChartEnabledSetting.get()) { 647 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled() & & this._flameChartEnabledSetting.get()) {
655 var tracingTimelineModel = WebInspector.experimentsSettings.timeline OnTraceEvents.isEnabled() ? this._tracingTimelineModel : null; 648 var tracingTimelineModel = WebInspector.experimentsSettings.timeline OnTraceEvents.isEnabled() ? this._tracingTimelineModel : null;
656 this._addModeView(new WebInspector.TimelineFlameChart(this, this._mo del, tracingTimelineModel, this._frameModel(), this._uiUtils)); 649 this._addModeView(new WebInspector.TimelineFlameChart(this, this._mo del, tracingTimelineModel, this._frameModel(), this._uiUtils));
657 } else { 650 } else {
658 this._addModeView(this._timelineView()); 651 this._addModeView(this._timelineView());
659 } 652 }
660 653
661 if (this._captureMemorySetting.get()) { 654 if (this._captureMemorySetting.get()) {
662 if (!isFrameMode) // Frame mode skews time, don't render aux overvi ews. 655 if (!isFrameMode) // Frame mode skews time, don't render aux overvi ews.
663 this._overviewControls.push(new WebInspector.TimelineMemoryOverv iew(this._model, this._uiUtils)); 656 this._overviewControls.push(new WebInspector.TimelineMemoryOverv iew(this._model, this._uiUtils));
664 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m odel, this._uiUtils)); 657 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m odel, this._uiUtils));
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 * @param {!WebInspector.TimelineModel.Record} record 1470 * @param {!WebInspector.TimelineModel.Record} record
1478 * @return {boolean} 1471 * @return {boolean}
1479 */ 1472 */
1480 accept: function(record) 1473 accept: function(record)
1481 { 1474 {
1482 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex); 1475 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex);
1483 }, 1476 },
1484 1477
1485 __proto__: WebInspector.TimelineModel.Filter.prototype 1478 __proto__: WebInspector.TimelineModel.Filter.prototype
1486 } 1479 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698