1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 WebInspector.ProfileTypeRegistry = function()
10 this._profileTypes = [];
12 this.cpuProfileType = new WebInspector.CPUProfileType();
13 this._addProfileType(this.cpuProfileType);
14 this.heapSnapshotProfileType = new WebInspector.HeapSnapshotProfileType();
15 this._addProfileType(this.heapSnapshotProfileType);
16 this.trackingHeapSnapshotProfileType = new WebInspector.TrackingHeapSnapshotProfileType();
17 this._addProfileType(this.trackingHeapSnapshotProfileType);
19 if (!WebInspector.isWorkerFrontend() && Runtime.experiments.isEnabled("canvasInspection")) {
20 this.canvasProfileType = new WebInspector.CanvasProfileType();
21 this._addProfileType(this.canvasProfileType);
25 WebInspector.ProfileTypeRegistry.prototype = {
27 * @param {!WebInspector.ProfileType} profileType
29 _addProfileType: function(profileType)
31 this._profileTypes.push(profileType);
35 * @return {!Array.<!WebInspector.ProfileType>}
37 profileTypes: function()
39 return this._profileTypes;
43 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry();