OLD | NEW |
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 Tools is a main class that wires all components of the | 6 * @fileoverview Tools is a main class that wires all components of the |
7 * DevTools frontend together. It is also responsible for overriding existing | 7 * DevTools frontend together. It is also responsible for overriding existing |
8 * WebInspector functionality while it is getting upstreamed into WebCore. | 8 * WebInspector functionality while it is getting upstreamed into WebCore. |
9 */ | 9 */ |
10 goog.provide('devtools.Tools'); | 10 goog.provide('devtools.Tools'); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 this.enableToggleButton.visible = false; | 284 this.enableToggleButton.visible = false; |
285 oldShow.call(this); | 285 oldShow.call(this); |
286 // Show is called on every show event of a panel, so | 286 // Show is called on every show event of a panel, so |
287 // we only need to intercept it once. | 287 // we only need to intercept it once. |
288 WebInspector.ProfilesPanel.prototype.show = oldShow; | 288 WebInspector.ProfilesPanel.prototype.show = oldShow; |
289 }; | 289 }; |
290 })(); | 290 })(); |
291 | 291 |
292 | 292 |
293 /* | 293 /* |
294 * @override» | 294 * @override |
295 * TODO(mnaganov): Restore l10n when it will be agreed that it is needed.» | 295 * TODO(mnaganov): Restore l10n when it will be agreed that it is needed. |
296 */» | 296 */ |
297 WebInspector.UIString = function(string) {» | 297 WebInspector.UIString = function(string) { |
298 return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));» | 298 return String.vsprintf(string, Array.prototype.slice.call(arguments, 1)); |
299 }; | 299 }; |
300 | 300 |
301 | 301 |
302 // There is no clear way of setting frame title yet. So sniffing main resource | 302 // There is no clear way of setting frame title yet. So sniffing main resource |
303 // load. | 303 // load. |
304 (function OverrideUpdateResource() { | 304 (function OverrideUpdateResource() { |
305 var originalUpdateResource = WebInspector.updateResource; | 305 var originalUpdateResource = WebInspector.updateResource; |
306 WebInspector.updateResource = function(identifier, payload) { | 306 WebInspector.updateResource = function(identifier, payload) { |
307 originalUpdateResource.call(this, identifier, payload); | 307 originalUpdateResource.call(this, identifier, payload); |
308 var resource = this.resources[identifier]; | 308 var resource = this.resources[identifier]; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 (function() { | 356 (function() { |
357 var originalCreatePanels = WebInspector._createPanels; | 357 var originalCreatePanels = WebInspector._createPanels; |
358 WebInspector._createPanels = function() { | 358 WebInspector._createPanels = function() { |
359 originalCreatePanels.apply(this, arguments); | 359 originalCreatePanels.apply(this, arguments); |
360 this.panels.heap = new WebInspector.HeapProfilerPanel(); | 360 this.panels.heap = new WebInspector.HeapProfilerPanel(); |
361 }; | 361 }; |
362 })(); | 362 })(); |
363 | 363 |
364 | 364 |
| 365 (function () { |
| 366 var orig = InjectedScriptAccess.getProperties; |
| 367 InjectedScriptAccess.getProperties = function( |
| 368 objectProxy, ignoreHasOwnProperty, callback) { |
| 369 if (objectProxy.isScope) { |
| 370 devtools.tools.getDebuggerAgent().resolveScope(objectProxy.objectId, |
| 371 callback); |
| 372 } else if (objectProxy.isV8Ref) { |
| 373 devtools.tools.getDebuggerAgent().resolveChildren(objectProxy.objectId, |
| 374 callback, true); |
| 375 } else { |
| 376 orig.apply(this, arguments); |
| 377 } |
| 378 }; |
| 379 })() |
| 380 |
| 381 |
365 WebInspector.resourceTrackingWasEnabled = function() | 382 WebInspector.resourceTrackingWasEnabled = function() |
366 { | 383 { |
367 InspectorController.resourceTrackingEnabled_ = true; | 384 InspectorController.resourceTrackingEnabled_ = true; |
368 this.panels.resources.resourceTrackingWasEnabled(); | 385 this.panels.resources.resourceTrackingWasEnabled(); |
369 } | 386 }; |
370 | 387 |
371 WebInspector.resourceTrackingWasDisabled = function() | 388 WebInspector.resourceTrackingWasDisabled = function() |
372 { | 389 { |
373 InspectorController.resourceTrackingEnabled_ = false; | 390 InspectorController.resourceTrackingEnabled_ = false; |
374 this.panels.resources.resourceTrackingWasDisabled(); | 391 this.panels.resources.resourceTrackingWasDisabled(); |
375 } | 392 }; |
OLD | NEW |