Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Unified Diff: Source/devtools/front_end/TracingModel.js

Issue 254613002: DevTools: add Tracing agent on back-end (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed obsolete code Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698