| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 #ifndef DartDOMStringMap_h | |
| 6 #define DartDOMStringMap_h | |
| 7 | |
| 8 #include "bindings/core/dart/DartDOMWrapper.h" | |
| 9 #include "core/dom/DOMStringMap.h" | |
| 10 | |
| 11 #include <dart_api.h> | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 struct DartDOMStringMap { | |
| 16 static const int dartClassId = DOMStringMapClassId; | |
| 17 typedef DOMStringMap NativeType; | |
| 18 const static bool isNode = false; | |
| 19 const static bool isEventTarget = false; | |
| 20 const static bool isActive = false; | |
| 21 const static bool isGarbageCollected = false; | |
| 22 | |
| 23 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce
ption) | |
| 24 { | |
| 25 DartDOMData* domData = DartDOMData::current(); | |
| 26 return DartDOMWrapper::unwrapDartWrapper<DartDOMStringMap>(domData, hand
le, exception); | |
| 27 } | |
| 28 | |
| 29 static Dart_Handle toDart(DOMStringMap* value) | |
| 30 { | |
| 31 DartDOMData* domData = DartDOMData::current(); | |
| 32 Dart_WeakPersistentHandle result = DartDOMWrapper::lookupWrapper<DartDOM
StringMap>(domData, value); | |
| 33 if (result) | |
| 34 return Dart_HandleFromWeakPersistent(result); | |
| 35 return DartDOMWrapper::createWrapper<DartDOMStringMap>(domData, value); | |
| 36 } | |
| 37 static void returnToDart(Dart_NativeArguments args, DOMStringMap* value) | |
| 38 { | |
| 39 DartDOMWrapper::returnToDart<DartDOMStringMap>(args, value); | |
| 40 } | |
| 41 | |
| 42 static Dart_Handle toDart(PassRefPtr< DOMStringMap > value) | |
| 43 { | |
| 44 return toDart(value.get()); | |
| 45 } | |
| 46 | |
| 47 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount, boo
l* autoSetupScope); | |
| 48 }; | |
| 49 | |
| 50 } | |
| 51 | |
| 52 #endif // DartDOMStringMap_h | |
| OLD | NEW |