| 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'); |
| 11 | 11 |
| 12 goog.require('devtools.DebuggerAgent'); | 12 goog.require('devtools.DebuggerAgent'); |
| 13 | 13 |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Dispatches raw message from the host. | 16 * Dispatches raw message from the host. |
| 17 * @param {string} remoteName | 17 * @param {string} remoteName |
| 18 * @prama {string} methodName | 18 * @prama {string} methodName |
| 19 * @param {Object} msg Message to dispatch. | 19 * @param {string} param1, param2, param3 Arguments to dispatch. |
| 20 */ | 20 */ |
| 21 devtools.dispatch = function(remoteName, methodName, msg) { | 21 devtools$$dispatch = function(remoteName, methodName, param1, param2, param3) { |
| 22 remoteName = 'Remote' + remoteName.substring(0, remoteName.length - 8); | 22 remoteName = 'Remote' + remoteName.substring(0, remoteName.length - 8); |
| 23 var agent = window[remoteName]; | 23 var agent = window[remoteName]; |
| 24 if (!agent) { | 24 if (!agent) { |
| 25 debugPrint('No remote agent "' + remoteName + '" found.'); | 25 debugPrint('No remote agent "' + remoteName + '" found.'); |
| 26 return; | 26 return; |
| 27 } | 27 } |
| 28 var method = agent[methodName]; | 28 var method = agent[methodName]; |
| 29 if (!method) { | 29 if (!method) { |
| 30 debugPrint('No method "' + remoteName + '.' + methodName + '" found.'); | 30 debugPrint('No method "' + remoteName + '.' + methodName + '" found.'); |
| 31 return; | 31 return; |
| 32 } | 32 } |
| 33 method.apply(this, msg); | 33 method.call(this, param1, param2, param3); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 | 36 |
| 37 devtools.ToolsAgent = function() { | 37 devtools.ToolsAgent = function() { |
| 38 RemoteToolsAgent.DidExecuteUtilityFunction = | 38 RemoteToolsAgent.DidExecuteUtilityFunction = |
| 39 devtools.Callback.processCallback; | 39 devtools.Callback.processCallback; |
| 40 RemoteToolsAgent.FrameNavigate = | 40 RemoteToolsAgent.FrameNavigate = |
| 41 goog.bind(this.frameNavigate_, this); | 41 goog.bind(this.frameNavigate_, this); |
| 42 RemoteToolsAgent.DispatchOnClient = | 42 RemoteToolsAgent.DispatchOnClient = |
| 43 goog.bind(this.dispatchOnClient_, this); | 43 goog.bind(this.dispatchOnClient_, this); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 { | 420 { |
| 421 InspectorController.resourceTrackingEnabled_ = true; | 421 InspectorController.resourceTrackingEnabled_ = true; |
| 422 this.panels.resources.resourceTrackingWasEnabled(); | 422 this.panels.resources.resourceTrackingWasEnabled(); |
| 423 } | 423 } |
| 424 | 424 |
| 425 WebInspector.resourceTrackingWasDisabled = function() | 425 WebInspector.resourceTrackingWasDisabled = function() |
| 426 { | 426 { |
| 427 InspectorController.resourceTrackingEnabled_ = false; | 427 InspectorController.resourceTrackingEnabled_ = false; |
| 428 this.panels.resources.resourceTrackingWasDisabled(); | 428 this.panels.resources.resourceTrackingWasDisabled(); |
| 429 } | 429 } |
| OLD | NEW |