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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js

Issue 2128133002: Timeline AddTraceProvider API Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Timeline AddTraceProvider API 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/timeline/TimelineController.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
index 3ce1bc2a3b2d5eb85e22af33d1ca022a59eb61d4..8f6c6a3b9b0f0ded8d9194997eeda18e73960532 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
@@ -31,6 +31,8 @@ WebInspector.TimelineController.prototype = {
*/
startRecording: function(captureCauses, enableJSSampling, captureMemory, capturePictures, captureFilmStrip)
{
+ this._extensionTraceProviders = WebInspector.extensionServer.traceProviders().slice();
+
function disabledByDefault(category)
{
return "disabled-by-default-" + category;
@@ -67,6 +69,9 @@ WebInspector.TimelineController.prototype = {
if (captureFilmStrip)
categoriesArray.push(disabledByDefault("devtools.screenshot"));
+ for (var traceProvider of this._extensionTraceProviders)
+ traceProvider.run();
caseq 2016/07/19 22:01:17 rename from run() to start()?
+
var categories = categoriesArray.join(",");
this._startRecordingWithCategories(categories, enableJSSampling);
},
@@ -77,6 +82,10 @@ WebInspector.TimelineController.prototype = {
this._target.tracingManager.stop();
this._targetsResumedPromise = WebInspector.targetManager.resumeAllTargets();
this._delegate.loadingStarted();
+
+ var target = WebInspector.targetManager.mainTarget();
caseq 2016/07/19 22:01:17 unused?
+ for (var traceProvider of this._extensionTraceProviders)
+ traceProvider.stop();
},
/**

Powered by Google App Engine
This is Rietveld 408576698