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 12 matching lines...) Expand all Loading... |
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 #ifndef DartUtilities_h | 30 #ifndef DartUtilities_h |
31 #define DartUtilities_h | 31 #define DartUtilities_h |
32 | 32 |
33 | |
34 #include "DartWebkitClassIds.h" | 33 #include "DartWebkitClassIds.h" |
35 | 34 |
36 #include "bindings/dart/DartDOMData.h" | 35 #include "bindings/dart/DartDOMData.h" |
37 #include "bindings/dart/DartStringCache.h" | 36 #include "bindings/dart/DartStringCache.h" |
38 #include "bindings/v8/V8RecursionScope.h" | 37 #include "bindings/v8/V8RecursionScope.h" |
39 #include "core/dom/DOMStringList.h" | 38 #include "core/dom/DOMStringList.h" |
40 #include "core/dom/MessagePort.h" | 39 #include "core/dom/MessagePort.h" |
41 #include "modules/mediastream/MediaStreamTrack.h" | 40 #include "modules/mediastream/MediaStreamTrack.h" |
42 | 41 |
43 #include <dart_api.h> | 42 #include <dart_api.h> |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 return dartToScriptValueWithNullCheck(object, exception); | 469 return dartToScriptValueWithNullCheck(object, exception); |
471 } | 470 } |
472 static Dart_Handle scriptValueToDart(const ScriptValue& value); | 471 static Dart_Handle scriptValueToDart(const ScriptValue& value); |
473 | 472 |
474 static PassRefPtr<SerializedScriptValue> dartToSerializedScriptValue(Dart_Ha
ndle, Dart_Handle& exception); | 473 static PassRefPtr<SerializedScriptValue> dartToSerializedScriptValue(Dart_Ha
ndle, Dart_Handle& exception); |
475 static Dart_Handle serializedScriptValueToDart(PassRefPtr<SerializedScriptVa
lue>); | 474 static Dart_Handle serializedScriptValueToDart(PassRefPtr<SerializedScriptVa
lue>); |
476 | 475 |
477 static Dart_Handle dateToDart(double); | 476 static Dart_Handle dateToDart(double); |
478 static double dartToDate(Dart_Handle, Dart_Handle&); | 477 static double dartToDate(Dart_Handle, Dart_Handle&); |
479 static double dartToDate(Dart_NativeArguments args, int idx, Dart_Handle&); | 478 static double dartToDate(Dart_NativeArguments args, int idx, Dart_Handle&); |
480 static bool isHtmlElement(DartDOMData*, Dart_Handle); | |
481 static bool isDateTime(DartDOMData*, Dart_Handle); | 479 static bool isDateTime(DartDOMData*, Dart_Handle); |
482 static bool isBlob(DartDOMData*, Dart_Handle); | 480 static bool isBlob(DartDOMData*, Dart_Handle); |
483 static bool isImageData(DartDOMData*, Dart_Handle); | 481 static bool isImageData(DartDOMData*, Dart_Handle); |
484 static bool isIDBKeyRange(DartDOMData*, Dart_Handle); | 482 static bool isIDBKeyRange(DartDOMData*, Dart_Handle); |
485 static bool isTypeSubclassOf(Dart_Handle type, intptr_t libraryId, const cha
r* typeName); | 483 static bool isTypeSubclassOf(Dart_Handle type, intptr_t libraryId, const cha
r* typeName); |
486 static bool isTypeSubclassOfTag(Dart_Handle type, const String& tagName); | 484 static bool isTypeSubclassOfTag(Dart_Handle type, const String& tagName); |
487 static bool objectIsType(Dart_Handle, Dart_Handle type); | 485 static bool objectIsType(Dart_Handle, Dart_Handle type); |
488 | 486 |
489 static bool isTypedData(Dart_Handle); | 487 static bool isTypedData(Dart_Handle); |
490 | 488 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 } | 649 } |
652 }; | 650 }; |
653 | 651 |
654 | 652 |
655 #define DART_UNIMPLEMENTED_EXCEPTION() DartUtilities::notImplementedException(__
FILE__, __LINE__) | 653 #define DART_UNIMPLEMENTED_EXCEPTION() DartUtilities::notImplementedException(__
FILE__, __LINE__) |
656 #define DART_UNIMPLEMENTED() Dart_ThrowException(DART_UNIMPLEMENTED_EXCEPTION())
; | 654 #define DART_UNIMPLEMENTED() Dart_ThrowException(DART_UNIMPLEMENTED_EXCEPTION())
; |
657 | 655 |
658 } // namespace WebCore | 656 } // namespace WebCore |
659 | 657 |
660 #endif // DartUtilities_h | 658 #endif // DartUtilities_h |
OLD | NEW |