Chromium Code Reviews| Index: Source/devtools/front_end/TimelineModel.js |
| diff --git a/Source/devtools/front_end/TimelineModel.js b/Source/devtools/front_end/TimelineModel.js |
| index 93d0c9eae03e6660312769a91f65e54c5440dee6..79dc380fa478c290093a5984653a88bb4429b25c 100644 |
| --- a/Source/devtools/front_end/TimelineModel.js |
| +++ b/Source/devtools/front_end/TimelineModel.js |
| @@ -42,6 +42,8 @@ WebInspector.TimelineModel = function() |
| WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, this._onRecordAdded, this); |
| WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, this._onStarted, this); |
| WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, this._onStopped, this); |
| + if (WebInspector.experimentsSettings.powerTimeline.isEnabled() && Capabilities.canProfilePower) |
|
pfeldman
2014/03/11 12:24:02
Timeline model is about timeline events. You shoul
|
| + WebInspector.powerProfiler.addEventListener(WebInspector.PowerProfiler.EventTypes.PowerEventRecorded, this._onRecordAdded, this); |
| } |
| WebInspector.TimelineModel.TransferChunkLengthBytes = 5000000; |
| @@ -106,6 +108,8 @@ WebInspector.TimelineModel.RecordType = { |
| WebSocketDestroy : "WebSocketDestroy", |
| EmbedderCallback : "EmbedderCallback", |
| + |
| + SoC_Package : "SoC_Package", |
| } |
| WebInspector.TimelineModel.Events = { |
| @@ -222,10 +226,16 @@ WebInspector.TimelineModel.prototype = { |
| var maxStackFrames = WebInspector.settings.timelineCaptureStacks.get() ? 30 : 0; |
| var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled(); |
| WebInspector.timelineManager.start(maxStackFrames, includeCounters, includeGPUEvents, this._fireRecordingStarted.bind(this)); |
| + |
| + if (WebInspector.experimentsSettings.powerTimeline.isEnabled() && Capabilities.canProfilePower) |
| + WebInspector.powerProfiler.startProfile(); |
| }, |
| stopRecording: function() |
| { |
| + if (WebInspector.experimentsSettings.powerTimeline.isEnabled() && Capabilities.canProfilePower) |
| + WebInspector.powerProfiler.stopProfile(); |
| + |
| if (!this._clientInitiatedRecording) { |
| WebInspector.timelineManager.start(undefined, undefined, undefined, stopTimeline.bind(this)); |
| return; |