diff options
| author | Iain Merrick <husky@google.com> | 2010-08-19 17:55:56 +0100 |
|---|---|---|
| committer | Iain Merrick <husky@google.com> | 2010-08-23 11:05:40 +0100 |
| commit | f486d19d62f1bc33246748b14b14a9dfa617b57f (patch) | |
| tree | 195485454c93125455a30e553a73981c3816144d /WebCore/inspector/front-end/InjectedScriptAccess.js | |
| parent | 6ba0b43722d16bc295606bec39f396f596e4fef1 (diff) | |
| download | external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.zip external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.tar.gz external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.tar.bz2 | |
Merge WebKit at r65615 : Initial merge by git.
Change-Id: Ifbf384f4531e3b58475a662e38195c2d9152ae79
Diffstat (limited to 'WebCore/inspector/front-end/InjectedScriptAccess.js')
| -rw-r--r-- | WebCore/inspector/front-end/InjectedScriptAccess.js | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/WebCore/inspector/front-end/InjectedScriptAccess.js b/WebCore/inspector/front-end/InjectedScriptAccess.js index b5aa9c7..ce264dd 100644 --- a/WebCore/inspector/front-end/InjectedScriptAccess.js +++ b/WebCore/inspector/front-end/InjectedScriptAccess.js @@ -29,17 +29,29 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -function InjectedScriptAccess(injectedScriptId) { - this._injectedScriptId = injectedScriptId; +function InjectedScriptAccess(worldId) { + this._worldId = worldId; } -InjectedScriptAccess.get = function(injectedScriptId) +InjectedScriptAccess.get = function(worldId) { - if (typeof injectedScriptId === "number") - return new InjectedScriptAccess(injectedScriptId); + if (typeof worldId === "number") + return new InjectedScriptAccess(worldId); - console.error("Access to injected script with no id"); - console.trace(); + console.assert(false, "Access to injected script with no id"); +} + +InjectedScriptAccess.getForNode = function(node) +{ + // FIXME: do something. + return InjectedScriptAccess.get(-node.id); +} + +InjectedScriptAccess.getForObjectId = function(objectId) +{ + // FIXME: move to native layer. + var tokens = objectId.split(":"); + return InjectedScriptAccess.get(parseInt(tokens[0])); } InjectedScriptAccess.getDefault = function() @@ -66,7 +78,7 @@ InjectedScriptAccess._installHandler = function(methodName, async) } var callId = WebInspector.Callback.wrap(myCallback); - InspectorBackend.dispatchOnInjectedScript(callId, this._injectedScriptId, methodName, argsString); + InspectorBackend.dispatchOnInjectedScript(callId, this._worldId, methodName, argsString); }; } @@ -75,12 +87,12 @@ InjectedScriptAccess._installHandler = function(methodName, async) // - Make sure last parameter of all the InjectedSriptAccess.* calls is a callback function. // We keep these sorted. InjectedScriptAccess._installHandler("evaluate"); -InjectedScriptAccess._installHandler("evaluateAndStringify"); InjectedScriptAccess._installHandler("evaluateInCallFrame"); InjectedScriptAccess._installHandler("evaluateOnSelf"); InjectedScriptAccess._installHandler("getCompletions"); InjectedScriptAccess._installHandler("getProperties"); InjectedScriptAccess._installHandler("getPrototypes"); -InjectedScriptAccess._installHandler("openInInspectedWindow"); InjectedScriptAccess._installHandler("pushNodeToFrontend"); +InjectedScriptAccess._installHandler("resolveNode"); +InjectedScriptAccess._installHandler("getNodeProperties"); InjectedScriptAccess._installHandler("setPropertyValue"); |
