| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 #ifndef Dart$(INTERFACE)_h | 7 #ifndef Dart$(INTERFACE)_h |
| 8 #define Dart$(INTERFACE)_h | 8 #define Dart$(INTERFACE)_h |
| 9 | 9 |
| 10 #include "DartDOMWrapper.h" | 10 #include "DartDOMWrapper.h" |
| 11 $WEBCORE_INCLUDES | 11 $WEBCORE_INCLUDES |
| 12 #include <dart_api.h> | 12 #include <dart_api.h> |
| 13 | 13 |
| 14 namespace WebCore { | 14 namespace WebCore { |
| 15 | 15 |
| 16 struct Dart$INTERFACE { | 16 struct Dart$INTERFACE { |
| 17 static const char* const dartImplementationClassName; | 17 static const char* const dartImplementationClassName; |
| 18 typedef $WEBCORE_CLASS_NAME NativeType; | 18 typedef $WEBCORE_CLASS_NAME NativeType; |
| 19 typedef $NATIVE_TRAITS_TYPE NativeTraits; | 19 typedef $NATIVE_TRAITS_TYPE NativeTraits; |
| 20 | 20 |
| 21 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce
ption) | 21 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce
ption) |
| 22 { | 22 { |
| 23 return DartDOMWrapper::unwrapDartWrapper<Dart$INTERFACE>(handle, excepti
on); | 23 return DartDOMWrapper::unwrapDartWrapper<Dart$INTERFACE>(handle, excepti
on); |
| 24 } | 24 } |
| 25 | 25 |
| 26 static bool instanceOf(Dart_Handle handle) | |
| 27 { | |
| 28 return DartDOMWrapper::instanceOf(dartImplementationClassName, handle); | |
| 29 } | |
| 30 | |
| 31 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); | 26 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); |
| 32 }; | 27 }; |
| 33 | 28 |
| 34 $TO_DART_VALUE | 29 $TO_DART_VALUE |
| 35 inline Dart_Handle toDartValue(PassRefPtr< $WEBCORE_CLASS_NAME > value) | 30 inline Dart_Handle toDartValue(PassRefPtr< $WEBCORE_CLASS_NAME > value) |
| 36 { | 31 { |
| 37 return toDartValue(value.get()); | 32 return toDartValue(value.get()); |
| 38 } | 33 } |
| 39 | 34 |
| 40 namespace Dart$(INTERFACE)Internal { | 35 namespace Dart$(INTERFACE)Internal { |
| 41 $DECLARATIONS | 36 $DECLARATIONS |
| 42 } | 37 } |
| 43 | 38 |
| 44 } | 39 } |
| 45 | 40 |
| 46 #endif // Dart$(INTERFACE)_h | 41 #endif // Dart$(INTERFACE)_h |
| OLD | NEW |