| 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 #ifndef DartDOMStringMap_h | 5 #ifndef DartDOMStringMap_h |
| 6 #define DartDOMStringMap_h | 6 #define DartDOMStringMap_h |
| 7 | 7 |
| 8 #include "bindings/dart/DartDOMWrapper.h" | 8 #include "bindings/dart/DartDOMWrapper.h" |
| 9 #include "core/dom/DOMStringMap.h" | 9 #include "core/dom/DOMStringMap.h" |
| 10 | 10 |
| 11 #include <dart_api.h> | 11 #include <dart_api.h> |
| 12 | 12 |
| 13 namespace WebCore { | 13 namespace WebCore { |
| 14 | 14 |
| 15 struct DartDOMStringMap { | 15 struct DartDOMStringMap { |
| 16 static const char* const dartImplementationClassName; | 16 static const char* const dartImplementationClassName; |
| 17 static const char* const dartImplementationLibraryName; | 17 static const char* const dartImplementationLibraryName; |
| 18 static intptr_t kBindingCid; |
| 18 typedef DOMStringMap NativeType; | 19 typedef DOMStringMap NativeType; |
| 19 const static bool isNode = false; | 20 const static bool isNode = false; |
| 20 const static bool isEventTarget = false; | 21 const static bool isEventTarget = false; |
| 21 const static bool isActive = false; | 22 const static bool isActive = false; |
| 22 | 23 |
| 23 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce
ption) | 24 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce
ption) |
| 24 { | 25 { |
| 25 return DartDOMWrapper::unwrapDartWrapper<DartDOMStringMap>(handle, excep
tion); | 26 return DartDOMWrapper::unwrapDartWrapper<DartDOMStringMap>(handle, excep
tion); |
| 26 } | 27 } |
| 27 | 28 |
| 28 static Dart_Handle toDart(DOMStringMap* value) | 29 static Dart_Handle toDart(DOMStringMap* value) |
| 29 { | 30 { |
| 30 return DartDOMWrapper::toDart<DartDOMStringMap>(value); | 31 return DartDOMWrapper::toDart<DartDOMStringMap>(value); |
| 31 } | 32 } |
| 32 | 33 |
| 33 static Dart_Handle toDart(PassRefPtr< DOMStringMap > value) | 34 static Dart_Handle toDart(PassRefPtr< DOMStringMap > value) |
| 34 { | 35 { |
| 35 return toDart(value.get()); | 36 return toDart(value.get()); |
| 36 } | 37 } |
| 37 | 38 |
| 38 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); | 39 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 } | 42 } |
| 42 | 43 |
| 43 #endif // DartDOMStringMap_h | 44 #endif // DartDOMStringMap_h |
| OLD | NEW |