OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 for (var i = 0; i < events.length; ++i) | 144 for (var i = 0; i < events.length; ++i) |
145 this._dispatcher.eventRecorded(events[i]); | 145 this._dispatcher.eventRecorded(events[i]); |
146 } | 146 } |
147 if (callback) | 147 if (callback) |
148 callback(error); | 148 callback(error); |
149 }, | 149 }, |
150 | 150 |
151 _configureCpuProfilerSamplingInterval: function() | 151 _configureCpuProfilerSamplingInterval: function() |
152 { | 152 { |
153 var intervalUs = WebInspector.settings.highResolutionCpuProfiling.get()
? 100 : 1000; | 153 var intervalUs = WebInspector.settings.highResolutionCpuProfiling.get()
? 100 : 1000; |
154 ProfilerAgent.setSamplingInterval(intervalUs, didChangeInterval.bind(thi
s)); | 154 ProfilerAgent.setSamplingInterval(intervalUs, didChangeInterval); |
155 | 155 |
156 /** | |
157 * @this {WebInspector.TimelineManager} | |
158 */ | |
159 function didChangeInterval(error) | 156 function didChangeInterval(error) |
160 { | 157 { |
161 if (error) | 158 if (error) |
162 this.target().consoleModel.showErrorMessage(error); | 159 WebInspector.console.error(error); |
163 } | 160 } |
164 }, | 161 }, |
165 | 162 |
166 __proto__: WebInspector.SDKObject.prototype | 163 __proto__: WebInspector.SDKObject.prototype |
167 } | 164 } |
168 | 165 |
169 /** | 166 /** |
170 * @constructor | 167 * @constructor |
171 * @implements {TimelineAgent.Dispatcher} | 168 * @implements {TimelineAgent.Dispatcher} |
172 */ | 169 */ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 progress: function(count) | 218 progress: function(count) |
222 { | 219 { |
223 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineProgress, count); | 220 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineProgress, count); |
224 } | 221 } |
225 } | 222 } |
226 | 223 |
227 /** | 224 /** |
228 * @type {!WebInspector.TimelineManager} | 225 * @type {!WebInspector.TimelineManager} |
229 */ | 226 */ |
230 WebInspector.timelineManager; | 227 WebInspector.timelineManager; |
OLD | NEW |