OLD | NEW |
1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, Google Inc. |
2 // All rights reserved. | 2 // 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 14 matching lines...) Expand all Loading... |
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "bindings/dart/DartUtilities.h" | 31 #include "bindings/dart/DartUtilities.h" |
32 | 32 |
33 #include "DartMessagePort.h" | 33 #include "DartMessagePort.h" |
34 #include "bindings/dart/DartDOMData.h" | 34 #include "bindings/dart/DartDOMData.h" |
35 #include "bindings/dart/DartDebugServer.h" | 35 #include "bindings/dart/DartHandleProxy.h" |
36 #include "bindings/dart/V8Converter.h" | 36 #include "bindings/dart/V8Converter.h" |
37 #include "bindings/v8/ScriptController.h" | 37 #include "bindings/v8/ScriptController.h" |
38 #include "bindings/v8/SerializedScriptValue.h" | 38 #include "bindings/v8/SerializedScriptValue.h" |
39 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
40 #include "core/html/canvas/DataView.h" | 40 #include "core/html/canvas/DataView.h" |
41 #include "core/inspector/ScriptArguments.h" | 41 #include "core/inspector/ScriptArguments.h" |
42 #include "core/inspector/ScriptCallStack.h" | 42 #include "core/inspector/ScriptCallStack.h" |
43 #include "core/loader/FrameLoader.h" | 43 #include "core/loader/FrameLoader.h" |
44 #include "core/page/DOMWindow.h" | 44 #include "core/page/DOMWindow.h" |
45 #include "core/page/Frame.h" | 45 #include "core/page/Frame.h" |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 813 } |
814 | 814 |
815 bool DartUtilities::processingUserGesture() | 815 bool DartUtilities::processingUserGesture() |
816 { | 816 { |
817 // FIXME: implement this. | 817 // FIXME: implement this. |
818 return false; | 818 return false; |
819 } | 819 } |
820 | 820 |
821 PassRefPtr<ScriptArguments> DartUtilities::createScriptArguments(Dart_Handle arg
ument, Dart_Handle& exception) | 821 PassRefPtr<ScriptArguments> DartUtilities::createScriptArguments(Dart_Handle arg
ument, Dart_Handle& exception) |
822 { | 822 { |
823 v8::Handle<v8::Value> v8Argument = DartDebugServer::convertInspectedValue(ar
gument); | 823 v8::Handle<v8::Value> v8Argument = DartHandleProxy::create(argument); |
824 Vector<ScriptValue> arguments; | 824 Vector<ScriptValue> arguments; |
825 arguments.append(v8Argument); | 825 arguments.append(v8Argument); |
826 ScriptState* scriptState = ScriptState::forContext(currentV8Context()); | 826 ScriptState* scriptState = ScriptState::forContext(currentV8Context()); |
827 return ScriptArguments::create(scriptState, arguments); | 827 return ScriptArguments::create(scriptState, arguments); |
828 } | 828 } |
829 | 829 |
830 PassRefPtr<ScriptCallStack> DartUtilities::createScriptCallStack() | 830 PassRefPtr<ScriptCallStack> DartUtilities::createScriptCallStack() |
831 { | 831 { |
832 // FIXME: wrap current dart call stack as ScriptCallStack. | 832 // FIXME: wrap current dart call stack as ScriptCallStack. |
833 Vector<ScriptCallFrame> wrappedCallFrames; | 833 Vector<ScriptCallFrame> wrappedCallFrames; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 Dart_Handle library = htmlLibraryForCurrentIsolate(); | 980 Dart_Handle library = htmlLibraryForCurrentIsolate(); |
981 ASSERT(!Dart_IsError(library)); | 981 ASSERT(!Dart_IsError(library)); |
982 | 982 |
983 Dart_Handle utilsClass = Dart_GetType(library, Dart_NewStringFromCString("_U
tils"), 0, 0); | 983 Dart_Handle utilsClass = Dart_GetType(library, Dart_NewStringFromCString("_U
tils"), 0, 0); |
984 ASSERT(!Dart_IsError(utilsClass)); | 984 ASSERT(!Dart_IsError(utilsClass)); |
985 | 985 |
986 return Dart_Invoke(utilsClass, Dart_NewStringFromCString(methodName), argCou
nt, args); | 986 return Dart_Invoke(utilsClass, Dart_NewStringFromCString(methodName), argCou
nt, args); |
987 } | 987 } |
988 | 988 |
989 } | 989 } |
OLD | NEW |