Chromium Code Reviews| Index: tools/dom/templates/html/dartium/cpp_header.template |
| =================================================================== |
| --- tools/dom/templates/html/dartium/cpp_header.template (revision 34719) |
| +++ tools/dom/templates/html/dartium/cpp_header.template (working copy) |
| @@ -18,14 +18,29 @@ |
| namespace WebCore { |
| struct Dart$INTERFACE { |
| - static const char* const dartImplementationClassName; |
| - static const int dartImplementationLibraryId; |
| - static const int dartClassId; |
| + static const int dartClassId = $(INTERFACE)ClassId; |
| typedef $WEBCORE_CLASS_NAME NativeType; |
| static const bool isNode = $IS_NODE; |
| static const bool isActive = $IS_ACTIVE; |
| static const bool isEventTarget = $IS_EVENT_TARGET; |
| + static ActiveDOMObject* toActiveDOMObject(void* value) |
|
vsm
2014/04/08 20:29:27
if HasConverters is false for the type, should the
siva
2014/04/08 23:09:03
I don't yet have the GC prolog code done yet. You
|
| + { |
| + $TO_ACTIVE |
| + } |
| + static EventTarget* toEventTarget(void* value) |
| + { |
| + $TO_EVENT_TARGET |
| + } |
| + static Node* toNode(void* value) |
| + { |
| + $TO_NODE |
| + } |
| + static $WEBCORE_CLASS_NAME* toNative(void* value) |
| + { |
| + return static_cast<$WEBCORE_CLASS_NAME*>(value); |
| + } |
| + |
| $TO_NATIVE |
| $TO_DART |
| static Dart_Handle toDart(PassRefPtr< $WEBCORE_CLASS_NAME > value) |
| @@ -36,12 +51,16 @@ |
| { |
| return createWrapper(value.get()); |
| } |
| - static void returnToDart(Dart_NativeArguments args, PassRefPtr< $WEBCORE_CLASS_NAME > value, bool autoDartScope = true) |
| + static void returnToDart(Dart_NativeArguments args, |
| + PassRefPtr< $WEBCORE_CLASS_NAME > value, |
| + bool autoDartScope = true) |
| { |
| return returnToDart(args, value.get(), autoDartScope); |
| } |
| - static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount, bool* autoSetupScope); |
| + static Dart_NativeFunction resolver(Dart_Handle name, |
| + int argumentCount, |
| + bool* autoSetupScope); |
| }; |
| Dart_Handle $(WEBCORE_CLASS_NAME_ESCAPED)_toDart(PassRefPtr< $WEBCORE_CLASS_NAME > value); |
| @@ -50,6 +69,6 @@ |
| $DECLARATIONS |
| } |
| -} |
| +} // namespace WebCore |
| #endif // Dart$(INTERFACE)_h |