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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 callFunctionWithEvalEnabled(releaseFunction, hadException); | 355 callFunctionWithEvalEnabled(releaseFunction, hadException); |
356 ASSERT(!hadException); | 356 ASSERT(!hadException); |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) | 360 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) |
361 { | 361 { |
362 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); | 362 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); |
363 } | 363 } |
364 | 364 |
365 void InjectedScript::setLastEvaluationResult(const String& objectId) | |
366 { | |
367 ASSERT(!isEmpty()); | |
368 ScriptFunctionCall setLastResultFunction(injectedScriptObject(), "setLastEva
luationResult"); | |
369 setLastResultFunction.appendArgument(objectId); | |
370 RefPtr<JSONValue> result; | |
371 makeCall(setLastResultFunction, &result); | |
372 } | |
373 | |
374 void InjectedScript::setCustomObjectFormatterEnabled(bool enabled) | 365 void InjectedScript::setCustomObjectFormatterEnabled(bool enabled) |
375 { | 366 { |
376 ASSERT(!isEmpty()); | 367 ASSERT(!isEmpty()); |
377 ScriptFunctionCall function(injectedScriptObject(), "setCustomObjectFormatte
rEnabled"); | 368 ScriptFunctionCall function(injectedScriptObject(), "setCustomObjectFormatte
rEnabled"); |
378 function.appendArgument(enabled); | 369 function.appendArgument(enabled); |
379 RefPtr<JSONValue> result; | 370 RefPtr<JSONValue> result; |
380 makeCall(function, &result); | 371 makeCall(function, &result); |
381 } | 372 } |
382 | 373 |
383 } // namespace blink | 374 } // namespace blink |
384 | 375 |
OLD | NEW |