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

Side by Side Diff: webkit/glue/devtools/js/inspector_controller_impl.js

Issue 460018: DevTools: make possible profiling of scripts doing heavy calculations. (Closed)
Patch Set: Comments addressed Created 11 years 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 * @fileoverview DevTools' implementation of the InspectorController API. 6 * @fileoverview DevTools' implementation of the InspectorController API.
7 */ 7 */
8 8
9 goog.provide('devtools.InspectorBackendImpl'); 9 goog.provide('devtools.InspectorBackendImpl');
10 goog.provide('devtools.InspectorFrontendHostImpl'); 10 goog.provide('devtools.InspectorFrontendHostImpl');
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 devtools.InspectorBackendImpl.prototype.setPauseOnExceptions = function( 128 devtools.InspectorBackendImpl.prototype.setPauseOnExceptions = function(
129 value) { 129 value) {
130 return devtools.tools.getDebuggerAgent().setPauseOnExceptions(value); 130 return devtools.tools.getDebuggerAgent().setPauseOnExceptions(value);
131 }; 131 };
132 132
133 133
134 /** 134 /**
135 * @override 135 * @override
136 */ 136 */
137 devtools.InspectorBackendImpl.prototype.startProfiling = function() { 137 devtools.InspectorBackendImpl.prototype.startProfiling = function() {
138 devtools.tools.getDebuggerAgent().startProfiling( 138 devtools.tools.getProfilerAgent().startProfiling(
139 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_CPU); 139 devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_CPU);
140 }; 140 };
141 141
142 142
143 /** 143 /**
144 * @override 144 * @override
145 */ 145 */
146 devtools.InspectorBackendImpl.prototype.stopProfiling = function() { 146 devtools.InspectorBackendImpl.prototype.stopProfiling = function() {
147 devtools.tools.getDebuggerAgent().stopProfiling( 147 devtools.tools.getProfilerAgent().stopProfiling(
148 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_CPU); 148 devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_CPU);
149 }; 149 };
150 150
151 151
152 /** 152 /**
153 * @override 153 * @override
154 */ 154 */
155 devtools.InspectorBackendImpl.prototype.getProfileHeaders = function(callId) { 155 devtools.InspectorBackendImpl.prototype.getProfileHeaders = function(callId) {
156 WebInspector.didGetProfileHeaders(callId, []); 156 WebInspector.didGetProfileHeaders(callId, []);
157 }; 157 };
158 158
(...skipping 15 matching lines...) Expand all
174 if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles)) { 174 if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles)) {
175 WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]); 175 WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]);
176 } 176 }
177 }; 177 };
178 178
179 179
180 /** 180 /**
181 * @override 181 * @override
182 */ 182 */
183 devtools.InspectorBackendImpl.prototype.takeHeapSnapshot = function() { 183 devtools.InspectorBackendImpl.prototype.takeHeapSnapshot = function() {
184 devtools.tools.getDebuggerAgent().startProfiling( 184 devtools.tools.getProfilerAgent().startProfiling(
185 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT 185 devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT
186 | devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_HEAP_STATS 186 | devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_STATS
187 | devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_JS_CONSTRUCTORS); 187 | devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_JS_CONSTRUCTORS);
188 }; 188 };
189 189
190 190
191 /** 191 /**
192 * @override 192 * @override
193 */ 193 */
194 devtools.InspectorBackendImpl.prototype.dispatchOnInjectedScript = function( 194 devtools.InspectorBackendImpl.prototype.dispatchOnInjectedScript = function(
195 callId, methodName, argsString, async) { 195 callId, methodName, argsString, async) {
196 var callback = function(result, isException) { 196 var callback = function(result, isException) {
197 WebInspector.didDispatchOnInjectedScript(callId, result, isException); 197 WebInspector.didDispatchOnInjectedScript(callId, result, isException);
(...skipping 24 matching lines...) Expand all
222 function(methodName, var_arg) { 222 function(methodName, var_arg) {
223 var args = Array.prototype.slice.call(arguments, 1); 223 var args = Array.prototype.slice.call(arguments, 1);
224 RemoteToolsAgent.DispatchOnInspectorController( 224 RemoteToolsAgent.DispatchOnInspectorController(
225 WebInspector.Callback.wrap(function(){}), 225 WebInspector.Callback.wrap(function(){}),
226 methodName, 226 methodName,
227 JSON.stringify(args)); 227 JSON.stringify(args));
228 }; 228 };
229 229
230 230
231 InspectorBackend = new devtools.InspectorBackendImpl(); 231 InspectorBackend = new devtools.InspectorBackendImpl();
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/devtools_host_stub.js ('k') | webkit/glue/devtools/js/profiler_agent.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698