OLD | NEW |
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 WebInspector.UIString("Capture pow
er information"))); | 334 WebInspector.UIString("Capture pow
er information"))); |
335 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi
s); | 335 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi
s); |
336 } | 336 } |
337 | 337 |
338 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()) { | 338 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()) { |
339 this._captureTracingSetting = WebInspector.settings.createSetting("t
imelineCaptureTracing", false); | 339 this._captureTracingSetting = WebInspector.settings.createSetting("t
imelineCaptureTracing", false); |
340 topPaneSidebarElement.appendChild(WebInspector.SettingsUI.createSett
ingCheckbox(WebInspector.UIString("Capture tracing"), | 340 topPaneSidebarElement.appendChild(WebInspector.SettingsUI.createSett
ingCheckbox(WebInspector.UIString("Capture tracing"), |
341 this._captureTracingSetting, true,
undefined, | 341 this._captureTracingSetting, true,
undefined, |
342 WebInspector.UIString("Capture tra
cing information"))); | 342 WebInspector.UIString("Capture tra
cing information"))); |
343 this._captureTracingSetting.addChangeListener(this._onModeChanged, t
his); | 343 this._captureTracingSetting.addChangeListener(this._onModeChanged, t
his); |
| 344 } else if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnab
led()) { |
| 345 this._captureLayersAndPicturesSetting = WebInspector.settings.create
Setting("timelineCaptureLayersAndPictures", false); |
| 346 topPaneSidebarElement.appendChild(WebInspector.SettingsUI.createSett
ingCheckbox(WebInspector.UIString("Capture pictures"), |
| 347 this._captureLayersAndPicturesSett
ing, true, undefined, |
| 348 WebInspector.UIString("Capture gra
phics layer positions and painted pictures"))); |
344 } | 349 } |
345 }, | 350 }, |
346 | 351 |
347 _createStatusBarItems: function() | 352 _createStatusBarItems: function() |
348 { | 353 { |
349 var panelStatusBarElement = this.element.createChild("div", "panel-statu
s-bar"); | 354 var panelStatusBarElement = this.element.createChild("div", "panel-statu
s-bar"); |
350 this._statusBarButtons = /** @type {!Array.<!WebInspector.StatusBarItem>
} */ ([]); | 355 this._statusBarButtons = /** @type {!Array.<!WebInspector.StatusBarItem>
} */ ([]); |
351 | 356 |
352 this.toggleTimelineButton = new WebInspector.StatusBarButton("", "record
-profile-status-bar-item"); | 357 this.toggleTimelineButton = new WebInspector.StatusBarButton("", "record
-profile-status-bar-item"); |
353 this.toggleTimelineButton.addEventListener("click", this._toggleTimeline
ButtonClicked, this); | 358 this.toggleTimelineButton.addEventListener("click", this._toggleTimeline
ButtonClicked, this); |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 | 650 |
646 this._stackView.show(this._searchableView.element); | 651 this._stackView.show(this._searchableView.element); |
647 }, | 652 }, |
648 | 653 |
649 /** | 654 /** |
650 * @param {boolean} userInitiated | 655 * @param {boolean} userInitiated |
651 */ | 656 */ |
652 _startRecording: function(userInitiated) | 657 _startRecording: function(userInitiated) |
653 { | 658 { |
654 this._userInitiatedRecording = userInitiated; | 659 this._userInitiatedRecording = userInitiated; |
655 this._model.startRecording(this._captureStacksSetting.get(), this._captu
reMemorySetting.get()); | 660 this._model.startRecording(this._captureStacksSetting.get(), this._captu
reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay
ersAndPicturesSetting.get()); |
656 if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() &&
this._lazyFrameModel) | 661 if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() &&
this._lazyFrameModel) |
657 this._lazyFrameModel.setMergeRecords(false); | 662 this._lazyFrameModel.setMergeRecords(false); |
658 | 663 |
659 for (var i = 0; i < this._overviewControls.length; ++i) | 664 for (var i = 0; i < this._overviewControls.length; ++i) |
660 this._overviewControls[i].timelineStarted(); | 665 this._overviewControls[i].timelineStarted(); |
661 | 666 |
662 if (userInitiated) | 667 if (userInitiated) |
663 WebInspector.userMetrics.TimelineStarted.record(); | 668 WebInspector.userMetrics.TimelineStarted.record(); |
664 }, | 669 }, |
665 | 670 |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 * @param {!WebInspector.TimelineModel.Record} record | 1440 * @param {!WebInspector.TimelineModel.Record} record |
1436 * @return {boolean} | 1441 * @return {boolean} |
1437 */ | 1442 */ |
1438 accept: function(record) | 1443 accept: function(record) |
1439 { | 1444 { |
1440 return !this._hiddenRecords[record.type()]; | 1445 return !this._hiddenRecords[record.type()]; |
1441 }, | 1446 }, |
1442 | 1447 |
1443 __proto__: WebInspector.TimelineModel.Filter.prototype | 1448 __proto__: WebInspector.TimelineModel.Filter.prototype |
1444 } | 1449 } |
OLD | NEW |