| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 this._filters.push(new TimelineModel.ExcludeTopLevelFilter()); | 64 this._filters.push(new TimelineModel.ExcludeTopLevelFilter()); |
| 65 } | 65 } |
| 66 if (!Runtime.experiments.isEnabled('timelinePaintTimingMarkers')) | 66 if (!Runtime.experiments.isEnabled('timelinePaintTimingMarkers')) |
| 67 this._filters.push(Timeline.TimelineUIUtils.paintEventsFilter()); | 67 this._filters.push(Timeline.TimelineUIUtils.paintEventsFilter()); |
| 68 | 68 |
| 69 /** @type {?Timeline.PerformanceModel} */ | 69 /** @type {?Timeline.PerformanceModel} */ |
| 70 this._performanceModel = null; | 70 this._performanceModel = null; |
| 71 /** @type {?Timeline.PerformanceModel} */ | 71 /** @type {?Timeline.PerformanceModel} */ |
| 72 this._pendingPerformanceModel = null; | 72 this._pendingPerformanceModel = null; |
| 73 | 73 |
| 74 this._cpuThrottlingManager = new Components.CPUThrottlingManager(); | 74 this._cpuThrottlingManager = new MobileThrottling.CPUThrottlingManager(); |
| 75 | 75 |
| 76 this._viewModeSetting = | 76 this._viewModeSetting = |
| 77 Common.settings.createSetting('timelineViewMode', Timeline.TimelinePanel
.ViewMode.FlameChart); | 77 Common.settings.createSetting('timelineViewMode', Timeline.TimelinePanel
.ViewMode.FlameChart); |
| 78 | 78 |
| 79 this._disableCaptureJSProfileSetting = Common.settings.createSetting('timeli
neDisableJSSampling', false); | 79 this._disableCaptureJSProfileSetting = Common.settings.createSetting('timeli
neDisableJSSampling', false); |
| 80 this._disableCaptureJSProfileSetting.setTitle(Common.UIString('Disable JavaS
cript Samples')); | 80 this._disableCaptureJSProfileSetting.setTitle(Common.UIString('Disable JavaS
cript Samples')); |
| 81 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); | 81 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); |
| 82 this._captureLayersAndPicturesSetting.setTitle(Common.UIString('Enable advan
ced paint instrumentation (slow)')); | 82 this._captureLayersAndPicturesSetting.setTitle(Common.UIString('Enable advan
ced paint instrumentation (slow)')); |
| 83 | 83 |
| 84 this._showScreenshotsSetting = Common.settings.createSetting('timelineShowSc
reenshots', true); | 84 this._showScreenshotsSetting = Common.settings.createSetting('timelineShowSc
reenshots', true); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 this._panelToolbar.appendToolbarItem(this._showSettingsPaneButton); | 253 this._panelToolbar.appendToolbarItem(this._showSettingsPaneButton); |
| 254 } | 254 } |
| 255 | 255 |
| 256 _createSettingsPane() { | 256 _createSettingsPane() { |
| 257 this._showSettingsPaneSetting = Common.settings.createSetting('timelineShowS
ettingsToolbar', false); | 257 this._showSettingsPaneSetting = Common.settings.createSetting('timelineShowS
ettingsToolbar', false); |
| 258 this._showSettingsPaneButton = new UI.ToolbarSettingToggle( | 258 this._showSettingsPaneButton = new UI.ToolbarSettingToggle( |
| 259 this._showSettingsPaneSetting, 'largeicon-settings-gear', Common.UIStrin
g('Capture settings')); | 259 this._showSettingsPaneSetting, 'largeicon-settings-gear', Common.UIStrin
g('Capture settings')); |
| 260 SDK.multitargetNetworkManager.addEventListener( | 260 SDK.multitargetNetworkManager.addEventListener( |
| 261 SDK.MultitargetNetworkManager.Events.ConditionsChanged, this._updateShow
SettingsToolbarButton, this); | 261 SDK.MultitargetNetworkManager.Events.ConditionsChanged, this._updateShow
SettingsToolbarButton, this); |
| 262 this._cpuThrottlingManager.addEventListener( | 262 this._cpuThrottlingManager.addEventListener( |
| 263 Components.CPUThrottlingManager.Events.RateChanged, this._updateShowSett
ingsToolbarButton, this); | 263 MobileThrottling.CPUThrottlingManager.Events.RateChanged, this._updateSh
owSettingsToolbarButton, this); |
| 264 this._disableCaptureJSProfileSetting.addChangeListener(this._updateShowSetti
ngsToolbarButton, this); | 264 this._disableCaptureJSProfileSetting.addChangeListener(this._updateShowSetti
ngsToolbarButton, this); |
| 265 this._captureLayersAndPicturesSetting.addChangeListener(this._updateShowSett
ingsToolbarButton, this); | 265 this._captureLayersAndPicturesSetting.addChangeListener(this._updateShowSett
ingsToolbarButton, this); |
| 266 | 266 |
| 267 this._settingsPane = new UI.HBox(); | 267 this._settingsPane = new UI.HBox(); |
| 268 this._settingsPane.element.classList.add('timeline-settings-pane'); | 268 this._settingsPane.element.classList.add('timeline-settings-pane'); |
| 269 this._settingsPane.show(this.element); | 269 this._settingsPane.show(this.element); |
| 270 | 270 |
| 271 var captureToolbar = new UI.Toolbar('', this._settingsPane.element); | 271 var captureToolbar = new UI.Toolbar('', this._settingsPane.element); |
| 272 captureToolbar.element.classList.add('flex-auto'); | 272 captureToolbar.element.classList.add('flex-auto'); |
| 273 captureToolbar.makeVertical(); | 273 captureToolbar.makeVertical(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 317 } |
| 318 return setting; | 318 return setting; |
| 319 } | 319 } |
| 320 | 320 |
| 321 /** | 321 /** |
| 322 * @return {!UI.ToolbarComboBox} | 322 * @return {!UI.ToolbarComboBox} |
| 323 */ | 323 */ |
| 324 _createNetworkConditionsSelect() { | 324 _createNetworkConditionsSelect() { |
| 325 var toolbarItem = new UI.ToolbarComboBox(null); | 325 var toolbarItem = new UI.ToolbarComboBox(null); |
| 326 toolbarItem.setMaxWidth(140); | 326 toolbarItem.setMaxWidth(140); |
| 327 NetworkConditions.NetworkConditionsSelector.decorateSelect(toolbarItem.selec
tElement()); | 327 MobileThrottling.NetworkConditionsSelector.decorateSelect(toolbarItem.select
Element()); |
| 328 return toolbarItem; | 328 return toolbarItem; |
| 329 } | 329 } |
| 330 | 330 |
| 331 _prepareToLoadTimeline() { | 331 _prepareToLoadTimeline() { |
| 332 console.assert(this._state === Timeline.TimelinePanel.State.Idle); | 332 console.assert(this._state === Timeline.TimelinePanel.State.Idle); |
| 333 this._setState(Timeline.TimelinePanel.State.Loading); | 333 this._setState(Timeline.TimelinePanel.State.Loading); |
| 334 this._pendingPerformanceModel = new Timeline.PerformanceModel(); | 334 this._pendingPerformanceModel = new Timeline.PerformanceModel(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 _createFileSelector() { | 337 _createFileSelector() { |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 return true; | 1333 return true; |
| 1334 case 'timeline.show-history': | 1334 case 'timeline.show-history': |
| 1335 panel._showHistory(); | 1335 panel._showHistory(); |
| 1336 return true; | 1336 return true; |
| 1337 } | 1337 } |
| 1338 return false; | 1338 return false; |
| 1339 } | 1339 } |
| 1340 }; | 1340 }; |
| 1341 | 1341 |
| 1342 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); | 1342 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); |
| OLD | NEW |