From ec2bc65f627293863a35ce2cf4f4c34f981dbe5d Mon Sep 17 00:00:00 2001 From: "pfeldman@chromium.org" Date: Fri, 4 Sep 2009 10:44:07 +0000 Subject: DevTools: Provisional support for serialized InjectedScript interaction. Review URL: http://codereview.chromium.org/199022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25441 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/devtools/js/devtools.html | 1 + webkit/glue/devtools/js/inspector_controller_impl.js | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'webkit') diff --git a/webkit/glue/devtools/js/devtools.html b/webkit/glue/devtools/js/devtools.html index 82bcaf5..f11402d 100644 --- a/webkit/glue/devtools/js/devtools.html +++ b/webkit/glue/devtools/js/devtools.html @@ -73,6 +73,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/webkit/glue/devtools/js/inspector_controller_impl.js b/webkit/glue/devtools/js/inspector_controller_impl.js index 0f12035..50b6f48 100644 --- a/webkit/glue/devtools/js/inspector_controller_impl.js +++ b/webkit/glue/devtools/js/inspector_controller_impl.js @@ -26,6 +26,7 @@ devtools.InspectorControllerImpl = function() { this.installInspectorControllerDelegate_('enableTimeline'); this.installInspectorControllerDelegate_('disableTimeline'); + //TODO: nuke with the next WebKit roll. this.installInjectedScriptDelegate_('getStyles'); this.installInjectedScriptDelegate_('getComputedStyle'); this.installInjectedScriptDelegate_('getInlineStyle'); @@ -269,6 +270,24 @@ devtools.InspectorControllerImpl.prototype.getProperties = function( /** + * @override + */ +devtools.InspectorControllerImpl.prototype.dispatchOnInjectedScript = function( + callId, methodName, argsString) { + var callback = function(result, isException) { + WebInspector.didDispatchOnInjectedScript(callId, + isException ? result : JSON.parse(result), + isException); + }; + RemoteToolsAgent.ExecuteUtilityFunction( + devtools.Callback.wrap(callback), + 'InjectedScript', + JSON.stringify(['dispatch', methodName, argsString])); +}; + + +/** + * TODO: nuke with the next WebKit roll. * Installs delegating handler into the inspector controller. * @param {string} methodName Method to install delegating handler for. */ @@ -280,6 +299,7 @@ devtools.InspectorControllerImpl.prototype.installInjectedScriptDelegate_ = /** + * TODO: nuke with the next WebKit roll. * Bound function with the installInjectedScriptDelegate_ actual * implementation. */ -- cgit v1.1