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

Unified Diff: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionTraceProvider.js

Issue 2128133002: Timeline AddTraceProvider API Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: 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);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698