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

Side by Side Diff: Source/devtools/front_end/sdk/CPUProfilerModel.js

Issue 400633003: DevTools: introduce multitarget model listeners (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 10 matching lines...) Expand all
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 /** 29 /**
30 * @constructor 30 * @constructor
31 * @extends {WebInspector.SDKObject} 31 * @extends {WebInspector.SDKModel}
32 * @param {!WebInspector.Target} target 32 * @param {!WebInspector.Target} target
33 * @implements {ProfilerAgent.Dispatcher} 33 * @implements {ProfilerAgent.Dispatcher}
34 */ 34 */
35 WebInspector.CPUProfilerModel = function(target) 35 WebInspector.CPUProfilerModel = function(target)
36 { 36 {
37 WebInspector.SDKObject.call(this, target); 37 WebInspector.SDKModel.call(this, WebInspector.CPUProfilerModel, target);
38 this._isRecording = false; 38 this._isRecording = false;
39 target.registerProfilerDispatcher(this); 39 target.registerProfilerDispatcher(this);
40 target.profilerAgent().enable(); 40 target.profilerAgent().enable();
41 41
42 this._configureCpuProfilerSamplingInterval(); 42 this._configureCpuProfilerSamplingInterval();
43 WebInspector.settings.highResolutionCpuProfiling.addChangeListener(this._con figureCpuProfilerSamplingInterval, this); 43 WebInspector.settings.highResolutionCpuProfiling.addChangeListener(this._con figureCpuProfilerSamplingInterval, this);
44 } 44 }
45 45
46 WebInspector.CPUProfilerModel.EventTypes = { 46 WebInspector.CPUProfilerModel.EventTypes = {
47 ProfileStarted: "ProfileStarted", 47 ProfileStarted: "ProfileStarted",
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 this.target().profilerAgent().stop(callback); 115 this.target().profilerAgent().stop(callback);
116 this.dispatchEventToListeners(WebInspector.CPUProfilerModel.EventTypes.P rofileStopped); 116 this.dispatchEventToListeners(WebInspector.CPUProfilerModel.EventTypes.P rofileStopped);
117 }, 117 },
118 118
119 dispose: function() 119 dispose: function()
120 { 120 {
121 WebInspector.settings.highResolutionCpuProfiling.removeChangeListener(th is._configureCpuProfilerSamplingInterval, this); 121 WebInspector.settings.highResolutionCpuProfiling.removeChangeListener(th is._configureCpuProfilerSamplingInterval, this);
122 }, 122 },
123 123
124 124
125 __proto__: WebInspector.SDKObject.prototype 125 __proto__: WebInspector.SDKModel.prototype
126 } 126 }
127 127
128 /** 128 /**
129 * @type {!WebInspector.CPUProfilerModel} 129 * @type {!WebInspector.CPUProfilerModel}
130 */ 130 */
131 WebInspector.cpuProfilerModel; 131 WebInspector.cpuProfilerModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotView.js ('k') | Source/devtools/front_end/sdk/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698