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

Side by Side Diff: Source/devtools/front_end/profiler/ProfileTypeRegistry.js

Issue 1073863003: DevTools: remove Canvas profiler from DevTools source base. See details in the bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tests gone Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 */ 7 */
8 WebInspector.ProfileTypeRegistry = function() 8 WebInspector.ProfileTypeRegistry = function()
9 { 9 {
10 this._profileTypes = []; 10 this._profileTypes = [];
11 11
12 this.cpuProfileType = new WebInspector.CPUProfileType(); 12 this.cpuProfileType = new WebInspector.CPUProfileType();
13 this._addProfileType(this.cpuProfileType); 13 this._addProfileType(this.cpuProfileType);
14 this.heapSnapshotProfileType = new WebInspector.HeapSnapshotProfileType(); 14 this.heapSnapshotProfileType = new WebInspector.HeapSnapshotProfileType();
15 this._addProfileType(this.heapSnapshotProfileType); 15 this._addProfileType(this.heapSnapshotProfileType);
16 this.trackingHeapSnapshotProfileType = new WebInspector.TrackingHeapSnapshot ProfileType(); 16 this.trackingHeapSnapshotProfileType = new WebInspector.TrackingHeapSnapshot ProfileType();
17 this._addProfileType(this.trackingHeapSnapshotProfileType); 17 this._addProfileType(this.trackingHeapSnapshotProfileType);
18
19 if (Runtime.experiments.isEnabled("canvasInspection")) {
20 this.canvasProfileType = new WebInspector.CanvasProfileType();
21 this._addProfileType(this.canvasProfileType);
22 }
23 } 18 }
24 19
25 WebInspector.ProfileTypeRegistry.prototype = { 20 WebInspector.ProfileTypeRegistry.prototype = {
26 /** 21 /**
27 * @param {!WebInspector.ProfileType} profileType 22 * @param {!WebInspector.ProfileType} profileType
28 */ 23 */
29 _addProfileType: function(profileType) 24 _addProfileType: function(profileType)
30 { 25 {
31 this._profileTypes.push(profileType); 26 this._profileTypes.push(profileType);
32 }, 27 },
33 28
34 /** 29 /**
35 * @return {!Array.<!WebInspector.ProfileType>} 30 * @return {!Array.<!WebInspector.ProfileType>}
36 */ 31 */
37 profileTypes: function() 32 profileTypes: function()
38 { 33 {
39 return this._profileTypes; 34 return this._profileTypes;
40 } 35 }
41 } 36 }
42 37
43 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry (); 38 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry ();
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/CanvasReplayStateView.js ('k') | Source/devtools/front_end/profiler/canvasProfiler.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698