- this._configureCpuProfilerSamplingInterval();
- WebInspector.settings.highResolutionCpuProfiling.addChangeListener(this._configureCpuProfilerSamplingInterval, this);
-}
-
-
-/**
- * @constructor
- */
-WebInspector.ProfileTypeRegistry = function() {
- this._profileTypes = [];
-
- this.cpuProfileType = new WebInspector.CPUProfileType();
- this._addProfileType(this.cpuProfileType);
- this.heapSnapshotProfileType = new WebInspector.HeapSnapshotProfileType();
- this._addProfileType(this.heapSnapshotProfileType);
- this.trackingHeapSnapshotProfileType = new WebInspector.TrackingHeapSnapshotProfileType();
- this._addProfileType(this.trackingHeapSnapshotProfileType);
- HeapProfilerAgent.enable();
-
- if (Capabilities.isMainFrontend && WebInspector.experimentsSettings.canvasInspection.isEnabled()) {
- this.canvasProfileType = new WebInspector.CanvasProfileType();
- this._addProfileType(this.canvasProfileType);
- }
+ WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.StateChanged, this._onProfilingStateChanged, this);