| 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 $TO_NATIVE |
| 22 { | |
| 23 return DartDOMWrapper::unwrapDartWrapper<Dart$INTERFACE>(handle, excepti
on); | |
| 24 } | |
| 25 | |
| 26 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); | 22 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); |
| 27 }; | 23 }; |
| 28 | 24 |
| 29 $TO_DART_VALUE | 25 $TO_DART |
| 30 inline Dart_Handle toDartValue(PassRefPtr< $WEBCORE_CLASS_NAME > value) | 26 inline Dart_Handle toDartValue(PassRefPtr< $WEBCORE_CLASS_NAME > value) |
| 31 { | 27 { |
| 32 return toDartValue(value.get()); | 28 return toDartValue(value.get()); |
| 33 } | 29 } |
| 34 | 30 |
| 35 namespace Dart$(INTERFACE)Internal { | 31 namespace Dart$(INTERFACE)Internal { |
| 36 $DECLARATIONS | 32 $DECLARATIONS |
| 37 } | 33 } |
| 38 | 34 |
| 39 } | 35 } |
| 40 | 36 |
| 41 #endif // Dart$(INTERFACE)_h | 37 #endif // Dart$(INTERFACE)_h |
| OLD | NEW |