OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 InjectedScript::InjectedScript() | 50 InjectedScript::InjectedScript() |
51 : InjectedScriptBase("InjectedScript") | 51 : InjectedScriptBase("InjectedScript") |
52 { | 52 { |
53 } | 53 } |
54 | 54 |
55 InjectedScript::InjectedScript(ScriptObject injectedScriptObject, InspectedState
AccessCheck accessCheck) | 55 InjectedScript::InjectedScript(ScriptObject injectedScriptObject, InspectedState
AccessCheck accessCheck) |
56 : InjectedScriptBase("InjectedScript", injectedScriptObject, accessCheck) | 56 : InjectedScriptBase("InjectedScript", injectedScriptObject, accessCheck) |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 void InjectedScript::evaluate(ErrorString* errorString, const String& expression
, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, boo
l generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuild
er::OptOutput<bool>* wasThrown) | 60 void InjectedScript::evaluate(ErrorString* errorString, const String& expression
, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, boo
l forceObjectId, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject
>* result, TypeBuilder::OptOutput<bool>* wasThrown) |
61 { | 61 { |
62 ScriptFunctionCall function(injectedScriptObject(), "evaluate"); | 62 ScriptFunctionCall function(injectedScriptObject(), "evaluate"); |
63 function.appendArgument(expression); | 63 function.appendArgument(expression); |
64 function.appendArgument(objectGroup); | 64 function.appendArgument(objectGroup); |
65 function.appendArgument(includeCommandLineAPI); | 65 function.appendArgument(includeCommandLineAPI); |
66 function.appendArgument(returnByValue); | 66 function.appendArgument(returnByValue); |
| 67 function.appendArgument(forceObjectId); |
67 function.appendArgument(generatePreview); | 68 function.appendArgument(generatePreview); |
68 makeEvalCall(errorString, function, result, wasThrown); | 69 makeEvalCall(errorString, function, result, wasThrown); |
69 } | 70 } |
70 | 71 |
71 void InjectedScript::callFunctionOn(ErrorString* errorString, const String& obje
ctId, const String& expression, const String& arguments, bool returnByValue, boo
l generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuild
er::OptOutput<bool>* wasThrown) | 72 void InjectedScript::callFunctionOn(ErrorString* errorString, const String& obje
ctId, const String& expression, const String& arguments, bool returnByValue, boo
l forceObjectId, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject
>* result, TypeBuilder::OptOutput<bool>* wasThrown) |
72 { | 73 { |
73 ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn"); | 74 ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn"); |
74 function.appendArgument(objectId); | 75 function.appendArgument(objectId); |
75 function.appendArgument(expression); | 76 function.appendArgument(expression); |
76 function.appendArgument(arguments); | 77 function.appendArgument(arguments); |
77 function.appendArgument(returnByValue); | 78 function.appendArgument(returnByValue); |
| 79 function.appendArgument(forceObjectId); |
78 function.appendArgument(generatePreview); | 80 function.appendArgument(generatePreview); |
79 makeEvalCall(errorString, function, result, wasThrown); | 81 makeEvalCall(errorString, function, result, wasThrown); |
80 } | 82 } |
81 | 83 |
82 void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptV
alue& callFrames, const String& callFrameId, const String& expression, const Str
ing& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generateP
review, RefPtr<RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown) | 84 void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptV
alue& callFrames, const String& callFrameId, const String& expression, const Str
ing& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool forceObje
ctId, bool generatePreview, RefPtr<RemoteObject>* result, TypeBuilder::OptOutput
<bool>* wasThrown) |
83 { | 85 { |
84 ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame"); | 86 ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame"); |
85 function.appendArgument(callFrames); | 87 function.appendArgument(callFrames); |
86 function.appendArgument(callFrameId); | 88 function.appendArgument(callFrameId); |
87 function.appendArgument(expression); | 89 function.appendArgument(expression); |
88 function.appendArgument(objectGroup); | 90 function.appendArgument(objectGroup); |
89 function.appendArgument(includeCommandLineAPI); | 91 function.appendArgument(includeCommandLineAPI); |
90 function.appendArgument(returnByValue); | 92 function.appendArgument(returnByValue); |
| 93 function.appendArgument(forceObjectId); |
91 function.appendArgument(generatePreview); | 94 function.appendArgument(generatePreview); |
92 makeEvalCall(errorString, function, result, wasThrown); | 95 makeEvalCall(errorString, function, result, wasThrown); |
93 } | 96 } |
94 | 97 |
95 void InjectedScript::restartFrame(ErrorString* errorString, const ScriptValue& c
allFrames, const String& callFrameId, RefPtr<JSONObject>* result) | 98 void InjectedScript::restartFrame(ErrorString* errorString, const ScriptValue& c
allFrames, const String& callFrameId, RefPtr<JSONObject>* result) |
96 { | 99 { |
97 ScriptFunctionCall function(injectedScriptObject(), "restartFrame"); | 100 ScriptFunctionCall function(injectedScriptObject(), "restartFrame"); |
98 function.appendArgument(callFrames); | 101 function.appendArgument(callFrames); |
99 function.appendArgument(callFrameId); | 102 function.appendArgument(callFrameId); |
100 RefPtr<JSONValue> resultValue; | 103 RefPtr<JSONValue> resultValue; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 ASSERT(!hadException); | 333 ASSERT(!hadException); |
331 } | 334 } |
332 | 335 |
333 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) | 336 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) |
334 { | 337 { |
335 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); | 338 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); |
336 } | 339 } |
337 | 340 |
338 } // namespace WebCore | 341 } // namespace WebCore |
339 | 342 |
OLD | NEW |