1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
7 #ifndef V8TestInterface5_h
8 #define V8TestInterface5_h
11 #include "bindings/core/v8/ScriptWrappable.h"
12 #include "bindings/core/v8/V8Binding.h"
13 #include "bindings/core/v8/V8DOMWrapper.h"
14 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
15 #include "bindings/core/v8/WrapperTypeInfo.h"
16 #include "bindings/tests/idls/modules/TestInterface5Implementation.h"
17 #include "platform/heap/Handle.h"
21 class V8TestInterface5 {
23 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
24 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Value>, v8::Isolate*);
25 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
26 static TestInterface5Implementation* toImpl(v8::Handle<v8::Object> object)
28 return toImpl(blink::toScriptWrappableBase(object));
30 static TestInterface5Implementation* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
31 static const WrapperTypeInfo wrapperTypeInfo;
32 static void refObject(ScriptWrappableBase* internalPointer);
33 static void derefObject(ScriptWrappableBase* internalPointer);
34 static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPointer);
35 static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>&, v8::Isolate*);
36 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
37 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&);
38 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
39 static inline ScriptWrappableBase* toScriptWrappableBase(TestInterface5Implementation* impl)
41 return impl->toScriptWrappableBase();
44 static inline TestInterface5Implementation* toImpl(ScriptWrappableBase* internalPointer)
46 return internalPointer->toImpl<TestInterface5Implementation>();
48 static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8::Isolate*);
49 static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*);
54 class TestInterface5Implementation;
55 v8::Handle<v8::Value> toV8(TestInterface5Implementation*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
57 template<class CallbackInfo>
58 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl)
60 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
63 template<class CallbackInfo>
64 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl)
66 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
69 template<class CallbackInfo, class Wrappable>
70 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl, Wrappable*)
72 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
75 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface5Implementation> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
77 return toV8(impl.get(), creationContext, isolate);
80 template<class CallbackInfo>
81 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface5Implementation> impl)
83 v8SetReturnValue(callbackInfo, impl.get());
86 template<class CallbackInfo>
87 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface5Implementation> impl)
89 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
92 template<class CallbackInfo, class Wrappable>
93 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface5Implementation> impl, Wrappable* wrappable)
95 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
99 #endif // ENABLE(CONDITION)
100 #endif // V8TestInterface5_h