OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @param {!WebInspector.TracingManager} tracingManager | 7 * @param {!WebInspector.TracingManager} tracingManager |
8 * @param {!WebInspector.TracingModel} tracingModel | 8 * @param {!WebInspector.TracingModel} tracingModel |
9 * @param {!WebInspector.TimelineModel.Filter} recordFilter | 9 * @param {!WebInspector.TimelineModel.Filter} recordFilter |
10 * @extends {WebInspector.TimelineModel} | 10 * @extends {WebInspector.TimelineModel} |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 { | 114 { |
115 this.name = name; | 115 this.name = name; |
116 /** @type {!Array.<!WebInspector.TracingModel.Event>} */ | 116 /** @type {!Array.<!WebInspector.TracingModel.Event>} */ |
117 this.events = []; | 117 this.events = []; |
118 /** @type {!Array.<!Array.<!WebInspector.TracingModel.Event>>} */ | 118 /** @type {!Array.<!Array.<!WebInspector.TracingModel.Event>>} */ |
119 this.asyncEvents = []; | 119 this.asyncEvents = []; |
120 } | 120 } |
121 | 121 |
122 WebInspector.TracingTimelineModel.prototype = { | 122 WebInspector.TracingTimelineModel.prototype = { |
123 /** | 123 /** |
124 * @param {boolean} captureStacks | 124 * @param {boolean} captureCauses |
125 * @param {boolean} captureMemory | 125 * @param {boolean} captureMemory |
126 * @param {boolean} capturePictures | 126 * @param {boolean} capturePictures |
127 */ | 127 */ |
128 startRecording: function(captureStacks, captureMemory, capturePictures) | 128 startRecording: function(captureCauses, captureMemory, capturePictures) |
129 { | 129 { |
130 function disabledByDefault(category) | 130 function disabledByDefault(category) |
131 { | 131 { |
132 return "disabled-by-default-" + category; | 132 return "disabled-by-default-" + category; |
133 } | 133 } |
134 var categoriesArray = [ | 134 var categoriesArray = [ |
135 "-*", | 135 "-*", |
136 disabledByDefault("devtools.timeline"), | 136 disabledByDefault("devtools.timeline"), |
137 disabledByDefault("devtools.timeline.frame"), | 137 disabledByDefault("devtools.timeline.frame"), |
138 WebInspector.TracingModel.ConsoleEventCategory | 138 WebInspector.TracingModel.ConsoleEventCategory |
139 ]; | 139 ]; |
140 if (captureStacks) { | 140 if (captureCauses) { |
141 categoriesArray.push(disabledByDefault("devtools.timeline.stack")); | 141 categoriesArray.push(disabledByDefault("devtools.timeline.stack")); |
142 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) { | 142 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) { |
143 this._jsProfilerStarted = true; | 143 this._jsProfilerStarted = true; |
144 this._currentTarget = WebInspector.context.flavor(WebInspector.T
arget); | 144 this._currentTarget = WebInspector.context.flavor(WebInspector.T
arget); |
145 this._configureCpuProfilerSamplingInterval(); | 145 this._configureCpuProfilerSamplingInterval(); |
146 this._currentTarget.profilerAgent().start(); | 146 this._currentTarget.profilerAgent().start(); |
147 } | 147 } |
148 } | 148 } |
149 if (capturePictures) { | 149 if (capturePictures) { |
150 categoriesArray = categoriesArray.concat([ | 150 categoriesArray = categoriesArray.concat([ |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 * @param {!WebInspector.ChunkedReader} reader | 1096 * @param {!WebInspector.ChunkedReader} reader |
1097 */ | 1097 */ |
1098 onChunkTransferred: function(reader) { }, | 1098 onChunkTransferred: function(reader) { }, |
1099 | 1099 |
1100 /** | 1100 /** |
1101 * @param {!WebInspector.ChunkedReader} reader | 1101 * @param {!WebInspector.ChunkedReader} reader |
1102 * @param {!Event} event | 1102 * @param {!Event} event |
1103 */ | 1103 */ |
1104 onError: function(reader, event) { }, | 1104 onError: function(reader, event) { }, |
1105 } | 1105 } |
OLD | NEW |