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 blink::toScriptWrappableBase(object)->toImpl<TestInterface5Implementation>();
30 static TestInterface5Implementation* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
31 static const WrapperTypeInfo wrapperTypeInfo;
32 static void refObject(ScriptWrappableBase*);
33 static void derefObject(ScriptWrappableBase*);
34 static void trace(Visitor* visitor, ScriptWrappableBase* scriptWrappableBase)
37 static void visitDOMWrapper(v8::Isolate*, ScriptWrappableBase*, const v8::Persistent<v8::Object>&);
38 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
39 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&);
40 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
41 static inline ScriptWrappableBase* toScriptWrappableBase(TestInterface5Implementation* impl)
43 return impl->toScriptWrappableBase();
45 static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8::Isolate*);
46 static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*);
49 v8::Handle<v8::Value> toV8(TestInterface5Implementation*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
51 template<typename CallbackInfo>
52 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl)
54 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
57 template<typename CallbackInfo>
58 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl)
60 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
63 template<typename CallbackInfo>
64 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl, const ScriptWrappable*)
66 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
70 #endif // ENABLE(CONDITION)
72 #endif // V8TestInterface5_h