Chromium Code Reviews| Index: Source/devtools/front_end/TracingModel.js |
| diff --git a/Source/devtools/front_end/TracingModel.js b/Source/devtools/front_end/TracingModel.js |
| index b5e316b3621fdb477b535a57c54b696fd045b3c4..7686ce04137fa6107154c3a30f9859c346cf7563 100644 |
| --- a/Source/devtools/front_end/TracingModel.js |
| +++ b/Source/devtools/front_end/TracingModel.js |
| @@ -65,18 +65,34 @@ WebInspector.TracingModel.MetadataEvent = { |
| ThreadName: "thread_name" |
| } |
| +WebInspector.TracingModel.DevToolsMetadataEventCategory = "disabled-by-default-devtools.timeline"; |
| + |
| +WebInspector.TracingModel.DevToolsMetadataEvent = { |
| + TracingStartedInPage: "TracingStartedInPage", |
| + SetLayerTreeId: "SetLayerTreeId" |
| +}; |
| + |
| WebInspector.TracingModel.prototype = { |
| /** |
| - * @param {string} categoryPatterns |
| + * @param {string} categoryFilter |
| + */ |
| + enable: function(categoryFilter) |
| + { |
| + TracingAgent.enable(categoryFilter); |
| + }, |
| + |
| + /** |
| + * @param {string} categoryFilter |
| * @param {string} options |
| * @param {function(?string)=} callback |
| */ |
| - start: function(categoryPatterns, options, callback) |
| + start: function(categoryFilter, options, callback) |
| { |
| this.reset(); |
| var bufferUsageReportingIntervalMs = 500; |
| - TracingAgent.start(categoryPatterns, options, bufferUsageReportingIntervalMs, callback); |
| + TracingAgent.start(categoryFilter, options, bufferUsageReportingIntervalMs, callback); |
| this._active = true; |
| + this._sessionId = null; |
| }, |
| /** |
| @@ -93,6 +109,14 @@ WebInspector.TracingModel.prototype = { |
| }, |
| /** |
| + * @return {?string} |
| + */ |
| + sessionId: function() |
| + { |
| + return this._sessionId; |
| + }, |
| + |
| + /** |
| * @param {number} usage |
| */ |
| _bufferUsage: function(usage) |
| @@ -433,6 +457,11 @@ WebInspector.TracingDispatcher = function(tracingModel) |
| } |
| WebInspector.TracingDispatcher.prototype = { |
| + pageTracingStarted: function(sessionId) |
|
yurys
2014/04/24 14:08:09
Annotate please.
|
| + { |
| + this._tracingModel._sessionId = sessionId; |
| + }, |
| + |
| bufferUsage: function(usage) |
| { |
| this._tracingModel._bufferUsage(usage); |