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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 this._captureStacksSetting = WebInspector.settings.createSetting("timeli
neCaptureStacks", true); | 365 this._captureStacksSetting = WebInspector.settings.createSetting("timeli
neCaptureStacks", true); |
366 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect
or.UIString("Stacks"), | 366 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect
or.UIString("Stacks"), |
367 this._capt
ureStacksSetting, | 367 this._capt
ureStacksSetting, |
368 WebInspect
or.UIString("Capture JavaScript stack on every timeline event"))); | 368 WebInspect
or.UIString("Capture JavaScript stack on every timeline event"))); |
369 this._captureMemorySetting = WebInspector.settings.createSetting("timeli
neCaptureMemory", false); | 369 this._captureMemorySetting = WebInspector.settings.createSetting("timeli
neCaptureMemory", false); |
370 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect
or.UIString("Memory"), | 370 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspect
or.UIString("Memory"), |
371 this._capt
ureMemorySetting, | 371 this._capt
ureMemorySetting, |
372 WebInspect
or.UIString("Capture memory information on every timeline event"))); | 372 WebInspect
or.UIString("Capture memory information on every timeline event"))); |
373 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); | 373 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); |
374 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled())
{ | 374 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled() &
& |
| 375 WebInspector.targetManager.mainTarget().hasCapability(WebInspector.T
arget.Capabilities.CanProfilePower)) { |
375 this._capturePowerSetting = WebInspector.settings.createSetting("tim
elineCapturePower", false); | 376 this._capturePowerSetting = WebInspector.settings.createSetting("tim
elineCapturePower", false); |
376 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns
pector.UIString("Power"), | 377 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns
pector.UIString("Power"), |
377 this._
capturePowerSetting, | 378 this._
capturePowerSetting, |
378 WebIns
pector.UIString("Capture power information"))); | 379 WebIns
pector.UIString("Capture power information"))); |
379 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi
s); | 380 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi
s); |
380 } | 381 } |
381 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled() &
& | 382 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled() &
& |
382 WebInspector.experimentsSettings.paintProfiler.isEnabled()) { | 383 WebInspector.experimentsSettings.paintProfiler.isEnabled()) { |
383 this._captureLayersAndPicturesSetting = WebInspector.settings.create
Setting("timelineCaptureLayersAndPictures", false); | 384 this._captureLayersAndPicturesSetting = WebInspector.settings.create
Setting("timelineCaptureLayersAndPictures", false); |
384 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns
pector.UIString("Paint"), | 385 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns
pector.UIString("Paint"), |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 this._addModeView(new WebInspector.TimelineFlameChart(this, this._tr
acingTimelineModel, this._frameModel())); | 606 this._addModeView(new WebInspector.TimelineFlameChart(this, this._tr
acingTimelineModel, this._frameModel())); |
606 else | 607 else |
607 this._addModeView(this._timelineView()); | 608 this._addModeView(this._timelineView()); |
608 | 609 |
609 if (this._captureMemorySetting.get()) { | 610 if (this._captureMemorySetting.get()) { |
610 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. | 611 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. |
611 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model, this._uiUtils)); | 612 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model, this._uiUtils)); |
612 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel, this._uiUtils)); | 613 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel, this._uiUtils)); |
613 } | 614 } |
614 | 615 |
615 if (this._capturePowerSetting && this._capturePowerSetting.get()) { | 616 if (this._capturePowerSetting && this._capturePowerSetting.get() && |
| 617 WebInspector.targetManager.mainTarget().hasCapability(WebInspector.T
arget.Capabilities.CanProfilePower)) { |
616 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. | 618 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. |
617 this._overviewControls.push(new WebInspector.TimelinePowerOvervi
ew(this._model)); | 619 this._overviewControls.push(new WebInspector.TimelinePowerOvervi
ew(this._model)); |
618 this._addModeView(new WebInspector.TimelinePowerGraph(this, this._mo
del)); | 620 this._addModeView(new WebInspector.TimelinePowerGraph(this, this._mo
del)); |
619 } | 621 } |
620 | 622 |
621 if (this._lazyTimelineView) | 623 if (this._lazyTimelineView) |
622 this._lazyTimelineView.setFrameModel(isFrameMode ? this._frameModel(
) : null); | 624 this._lazyTimelineView.setFrameModel(isFrameMode ? this._frameModel(
) : null); |
623 | 625 |
624 this._overviewPane.setOverviewControls(this._overviewControls); | 626 this._overviewPane.setOverviewControls(this._overviewControls); |
625 this.doResize(); | 627 this.doResize(); |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 * @param {!WebInspector.TimelineModel.Record} record | 1420 * @param {!WebInspector.TimelineModel.Record} record |
1419 * @return {boolean} | 1421 * @return {boolean} |
1420 */ | 1422 */ |
1421 accept: function(record) | 1423 accept: function(record) |
1422 { | 1424 { |
1423 return !this._regex || this._uiUtils.testContentMatching(record, this._r
egex); | 1425 return !this._regex || this._uiUtils.testContentMatching(record, this._r
egex); |
1424 }, | 1426 }, |
1425 | 1427 |
1426 __proto__: WebInspector.TimelineModel.Filter.prototype | 1428 __proto__: WebInspector.TimelineModel.Filter.prototype |
1427 } | 1429 } |
OLD | NEW |