Index: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionTraceProvider.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionTraceProvider.js b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionTraceProvider.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..435160655a9f5efe09dd11827e164f2469bc115c |
--- /dev/null |
+++ b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionTraceProvider.js |
@@ -0,0 +1,40 @@ |
+/** |
+ * @constructor |
+ * @param {string} extensionOrigin |
+ * @param {string} id |
+ * @param {string} categoryName |
+ * @param {string} categoryTooltip |
+ */ |
+WebInspector.ExtensionTraceProvider = function(extensionOrigin, id, categoryName, categoryTooltip) |
+{ |
+ this._extensionOrigin = extensionOrigin; |
+ this._id = id; |
+ this._categoryName = categoryName; |
+ this._categoryTooltip = categoryTooltip; |
+} |
+ |
+WebInspector.ExtensionTraceProvider.prototype = { |
+ get id() |
caseq
2016/07/08 00:57:49
It doesn't look like we have to expose id external
|
+ { |
+ return this._id; |
+ }, |
caseq
2016/07/08 00:57:49
add blank lines after all methods.
|
+ get categoryName() |
caseq
2016/07/08 00:57:49
please add @return annotations. Also, no getters i
|
+ { |
+ return this._categoryName; |
+ }, |
+ get categoryTooltip() |
+ { |
+ return this._categoryTooltip; |
+ }, |
+ run: function() |
caseq
2016/07/08 00:57:49
s/run/start/
|
+ { |
+ WebInspector.extensionServer.startTraceRecording(this.id); |
+ }, |
+ /** |
+ * @param {!Array.<!WebInspector.NetworkRequest>} requests |
caseq
2016/07/08 00:57:49
nit: Array<!WebInspector.NetworkRequest>
|
+ */ |
+ stop: function(requests) |
+ { |
+ WebInspector.extensionServer.stopTraceRecording(this.id); |
+ } |
+} |