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

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

Issue 355012: DevTools: prepare for WebKit change 50460. (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « webkit/glue/devtools/js/inspector_controller.js ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 goog.require('devtools.InspectorController'); 8 goog.require('devtools.InspectorController');
9 9
10 goog.provide('devtools.InspectorControllerImpl'); 10 goog.provide('devtools.InspectorControllerImpl');
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 */ 241 */
242 devtools.InspectorControllerImpl.prototype.stopProfiling = function() { 242 devtools.InspectorControllerImpl.prototype.stopProfiling = function() {
243 devtools.tools.getDebuggerAgent().stopProfiling( 243 devtools.tools.getDebuggerAgent().stopProfiling(
244 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_CPU); 244 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_CPU);
245 }; 245 };
246 246
247 247
248 /** 248 /**
249 * @override 249 * @override
250 */ 250 */
251 devtools.InspectorControllerImpl.prototype.getProfileHeaders = function(callId) {
252 WebInspector.didGetProfileHeaders(callId, []);
253 };
254
255
256 /**
257 * Emulate WebKit InspectorController behavior. It stores profiles on renderer s ide,
258 * and is able to retrieve them by uid using 'getProfile'.
259 */
260 devtools.InspectorControllerImpl.prototype.addFullProfile = function(profile) {
261 WebInspector.__fullProfiles = WebInspector.__fullProfiles || {};
262 WebInspector.__fullProfiles[profile.uid] = profile;
263 };
264
265
266 /**
267 * @override
268 */
269 devtools.InspectorControllerImpl.prototype.getProfile = function(callId, uid) {
270 if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles)) {
271 WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]);
272 }
273 };
274
275
276 /**
277 * @override
278 */
251 devtools.InspectorControllerImpl.prototype.takeHeapSnapshot = function() { 279 devtools.InspectorControllerImpl.prototype.takeHeapSnapshot = function() {
252 devtools.tools.getDebuggerAgent().startProfiling( 280 devtools.tools.getDebuggerAgent().startProfiling(
253 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT 281 devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT
254 | devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_HEAP_STATS 282 | devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_HEAP_STATS
255 | devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_JS_CONSTRUCTORS); 283 | devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_JS_CONSTRUCTORS);
256 }; 284 };
257 285
258 286
259 /** 287 /**
260 * @override 288 * @override
(...skipping 29 matching lines...) Expand all
290 function(methodName, var_arg) { 318 function(methodName, var_arg) {
291 var args = Array.prototype.slice.call(arguments, 1); 319 var args = Array.prototype.slice.call(arguments, 1);
292 RemoteToolsAgent.DispatchOnInspectorController( 320 RemoteToolsAgent.DispatchOnInspectorController(
293 WebInspector.Callback.wrap(function(){}), 321 WebInspector.Callback.wrap(function(){}),
294 methodName, 322 methodName,
295 JSON.stringify(args)); 323 JSON.stringify(args));
296 }; 324 };
297 325
298 326
299 InspectorController = new devtools.InspectorControllerImpl(); 327 InspectorController = new devtools.InspectorControllerImpl();
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/inspector_controller.js ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698