| Index: sky/engine/bindings-dart/core/dart/DartCustomElementWrapper.h
|
| diff --git a/sky/engine/bindings/core/v8/CustomElementWrapper.h b/sky/engine/bindings-dart/core/dart/DartCustomElementWrapper.h
|
| similarity index 61%
|
| copy from sky/engine/bindings/core/v8/CustomElementWrapper.h
|
| copy to sky/engine/bindings-dart/core/dart/DartCustomElementWrapper.h
|
| index 928ce15ddd124fffdfaa039e2843dc27e36e931b..ac4b3c330d2b6fc254f3c161503ac7667159957c 100644
|
| --- a/sky/engine/bindings/core/v8/CustomElementWrapper.h
|
| +++ b/sky/engine/bindings-dart/core/dart/DartCustomElementWrapper.h
|
| @@ -28,26 +28,38 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef SKY_ENGINE_BINDINGS_CORE_V8_CUSTOMELEMENTWRAPPER_H_
|
| -#define SKY_ENGINE_BINDINGS_CORE_V8_CUSTOMELEMENTWRAPPER_H_
|
| +#ifndef DartCustomElementWrapper_h
|
| +#define DartCustomElementWrapper_h
|
|
|
| -#include "sky/engine/wtf/PassRefPtr.h"
|
| -#include "v8/include/v8.h"
|
| +#include "bindings/core/dart/DartDOMData.h"
|
| +#include "wtf/PassRefPtr.h"
|
| +#include <dart_api.h>
|
|
|
| namespace blink {
|
|
|
| class HTMLElement;
|
| +class SVGElement;
|
| +
|
| +template<typename ElementType>
|
| +class DartCustomElementWrapper {
|
| +public:
|
| + static Dart_Handle upgradeDartWrapper(ElementType*, Dart_Handle (*createSpecificWrapper)(DartDOMData*, ElementType*));
|
| +
|
| + static Dart_Handle changeElementWrapper(Dart_Handle element, Dart_Handle wrapperType);
|
| +
|
| + static void initializeCustomElement(Dart_Handle wrapper, Dart_Handle& exception);
|
|
|
| -template<typename ElementType, typename WrapperType>
|
| -class CustomElementWrapper {
|
| private:
|
| - CustomElementWrapper();
|
| + DartCustomElementWrapper();
|
| +
|
| + friend Dart_Handle createDartHTMLWrapper(DartDOMData*, HTMLElement*);
|
| + friend Dart_Handle createDartSVGWrapper(DartDOMData*, SVGElement*);
|
|
|
| - friend v8::Handle<v8::Object> createV8HTMLWrapper(HTMLElement*, v8::Handle<v8::Object>, v8::Isolate*);
|
| + static Dart_Handle swapElementWrapper(DartDOMData*, ElementType*, Dart_Handle wrapperType, intptr_t nativeClassId);
|
|
|
| - static v8::Handle<v8::Object> wrap(PassRefPtr<ElementType>, v8::Handle<v8::Object> creationContext, v8::Isolate*, v8::Handle<v8::Object> (*createSpecificWrapper)(ElementType* element, v8::Handle<v8::Object> creationContext, v8::Isolate*));
|
| + static Dart_Handle wrap(PassRefPtr<ElementType>, Dart_Handle (*createSpecificWrapper)(DartDOMData*, ElementType*));
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // SKY_ENGINE_BINDINGS_CORE_V8_CUSTOMELEMENTWRAPPER_H_
|
| +#endif // CustomElementWrapper_h
|
|
|